Page 1 of 1

if, else

Posted: Tue Nov 10, 2009 7:29 pm
by Colwell
I'm pretty confused here, I've got
if($_SESSION['regis']==1)
Some code here
else
more code
and when I run it I get this error
Parse error: syntax error, unexpected T_ELSE in /www/uuuq.com/c/o/l/colwell/htdocs/welcome.php on line 14

Re: if, else

Posted: Tue Nov 10, 2009 10:53 pm
by guru2k9
Hi

Please check the session value,before the if condition.
Whether the value to the session is there or not.
Or try this
if($_SESSION['regis']=='1')

Thanks