well if that is what you think the problem is, then you will need to do some {} checking, you may be closing too many so the last else is confused, and not all the times will parse errors occur, cuz you have the right amount of { and }, but they simply are in the wrong places
what i would suggest is take out all the other checking code but the if's stuff and save it as something else and make it down to the barebones if/else combos, then start putting in conditions and your blocks of code
baby steps sometimes is the best way to go, cuz then you don't have a huge chunk of code to check cuz you only put in say 3 lines and now it doesn't work, then you just check the 3 lines
catch my drift
i know this isn't really solving your problem, but it should help you
track down your problem
kinda indelved in a large project right now so am just hopping back and forth from it to phpbuilder and helping as much as possible
i know i have helped you before when you were starting the login process, but i was not busy at that time, sorry