View Full Version : Error with part of an if statement

09-06-2008, 08:43 PM
I got this error when building the validation for one of the forms.
the error is:
Parse error: syntax error, unexpected T_IF in C:\wamp\www\getaband.net\register\musicians.php on line 41
This is line 41:

if($_POST['sex']=="male" || $_POST['sex']=="female"){
I can't seen what I've done wrong. If someone could help me out that would be great.


09-06-2008, 09:11 PM
what is the line above it? it could be missing a ;

09-06-2008, 10:02 PM
you must be psychic, thats what was wrong... i wonder what else you know... lol :P

09-07-2008, 07:06 PM
haha. im not psychic, but you won't believe how many times that same error has happened to me.