TheJoey Posted September 4, 2009 Share Posted September 4, 2009 if ($age)<16 && >90) $errorage = true; im getting error with this line of code. Parse error: syntax error, unexpected '<' in C:\xampplite\htdocs\Trial\New Folder\save.php on line 55 Quote Link to comment Share on other sites More sharing options...
TheJoey Posted September 4, 2009 Author Share Posted September 4, 2009 if ($age)<16 && >90) $errorage = true; im getting error with this line of code. Parse error: syntax error, unexpected '<' in C:\xampplite\htdocs\Trial\New Folder\save.php on line 55 Quote Link to comment Share on other sites More sharing options...
BinaryG Posted September 4, 2009 Share Posted September 4, 2009 try this if ($age <16 && $age >90) $errorage = true; you need to compare the var in both cases Quote Link to comment Share on other sites More sharing options...
rhodesa Posted September 4, 2009 Share Posted September 4, 2009 this line needs to be changed to: if ($age < 16 && $age > 90) $errorage = true; to make the errors go away...but it doesn't make sense, cus $age can't be less then 16 AND greater 90...do you mean or? if ($age < 16 || $age > 90) $errorage = true; Quote Link to comment Share on other sites More sharing options...
BinaryG Posted September 4, 2009 Share Posted September 4, 2009 yea true missed that one rhodesa Quote Link to comment Share on other sites More sharing options...
TheJoey Posted September 4, 2009 Author Share Posted September 4, 2009 this line needs to be changed to: if ($age < 16 && $age > 90) $errorage = true; to make the errors go away...but it doesn't make sense, cus $age can't be less then 16 AND greater 90...do you mean or? if ($age < 16 || $age > 90) $errorage = true; yer i used those numbers as a example but yer i want the age to be between 16-90 Quote Link to comment Share on other sites More sharing options...
TheJoey Posted September 4, 2009 Author Share Posted September 4, 2009 thanks guys. i ran into another problem on line 82 which has nothing on it. Parse error: syntax error, unexpected $end in C:\xampplite\htdocs\Trial\New Folder\save.php on line 82 Quote Link to comment Share on other sites More sharing options...
rhodesa Posted September 4, 2009 Share Posted September 4, 2009 can you paste all the code? you are probably missing a close brace: } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.