How To Fix: Parse error: parse error, unexpected T_IF in php on line 36
RegisterLogin
Webune Forums » General Errors » How To Fix: Parse error: parse error, unexpected T_IF in php on line 36
How To Fix: Parse error: parse error, unexpected T_IF in php on line 36
Post Description: How To Fix: Parse error: parse error, unexpected T_IF in php on line 36
Tags: How, To, Fix:, Parse, error:, parse, error,, unexpected, T_IF, in, php, on, line, 36
This Post Was Posted On Feb 29, 2008 By web hosting #1110
Post Description: How To Fix: Parse error: parse error, unexpected T_IF in php on line 36
Tags: How, To, Fix:, Parse, error:, parse, error,, unexpected, T_IF, in, php, on, line, 36
This Post Was Posted On Feb 29, 2008 By web hosting #1110
How To Fix: Parse error: parse error, unexpected T_IF in php on line 36 by web hosting
hi, my name is hostman, i am with Webune.com Support - I help many people with php. If you ever need PHP hosting, Visit Webune.
I was writing a script with PHP and i kept getting this error and wondered what the heck is wrong here, but i couldn't see the what was wrong on my script, till finally i found it and fixed it, so i though i post it here just in case there is anyone who might need some help on this.
this the error i got:
Parse error: parse error, unexpected T_IF in C:htdocsmyscript.php on line 36
and this is how my code looked like on like around 36
Line 36: if(!$_POST[name] && !$_POST[pass]
Line 37: {
Line 38: $error = "invalid password ";
Line 39: echo form($error);
Line 40: }
Line 41: else
Line 37: {
Line 38: $error = "invalid password ";
Line 39: echo form($error);
Line 40: }
Line 41: else
ok, as you can see, the problem is that i don't have a ) at the end of !$_POST[pass] so all i had to do is put a ) at the end and it worked.
so basically, if you are getting this error is because you might be missing a closing bracket or parentesis.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
hostman
#1476 1
i've seen this error, its because you don't have a closing braker on your if/else statement. this is the character you are missing: }
Jun 23, 2007 Reply Report abuse
need help with T_IF ERROR
#1475 2
add me if you can help me please
it says t_if error on line 12
line 12: if (mysql_num_rows($uq)==0)
line 13:
it says t_if error on line 12
line 12: if (mysql_num_rows($uq)==0)
line 13:
Jun 23, 2007 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 3:24 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3