Forum Moderators: coopster

Message Too Old, No Replies

Parse error

Worked fine locally, but not on Web server

         

may_hem1

2:10 pm on Oct 29, 2003 (gmt 0)

10+ Year Member



Hi, I have a PHP login script which works when I run it on a Win2000 Server PC in my home but when I upload it to my Linux Web space it give me this error:

Parse error: parse error, expecting `')'' in control.php on line 30

This is the code section where the error occurs:

if(isset($_COOKIE['username'])){
if(isAdmin($_COOKIE['username'])) $your_p='2';
elseif(isset($_COOKIE['username'],$_COOKIE['password'])) $your_p='1';
else $your_p='0';
}
else
{
$your_p='0';
}

Line 30, referred to in the error message, is the elseif line:

elseif(isset($_COOKIE['username'],$_COOKIE['password'])) $your_p='1';

Does anyone here know what the problem might be?

Thx,
May

ukgimp

2:16 pm on Oct 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try

elseif(isset($_COOKIE['username'],$_COOKIE['password'])) $your_p='1';
else
{
$your_p='0';
}

if that does not work, I am not sure you need the ' either side as they are numbers.