ok I don't understand why you have that if else query before the drop down boxes (which I took to be the form...) move that else to after the drop down boxes and move the second end if else } to after the drop down boxes, then process the form then have a last }.

As before if you can post your code taking out long section of code BUT leaving in the if else structure then I can help a bit more.

But essentially the if else statement for the Forename section should only end after you have done ALL updating to the dB and drop down boxes etc etc . next will come the form which is in the first if else statement.

Basically you didn't have enough if else statement and brackets hence the error, try and indent each if else section that way you can see what goes in where

Sarah