madspof Posted November 22, 2007 Share Posted November 22, 2007 Hi everyone i am getting this php error "Parse error: syntax error, unexpected '}' in /www/110mb.com/i/m/p/a/c/t/-/y/impact-ye/htdocs/Login.php on line 16" I am quite an expericenced php user but i cannot see why i am getting this, its probaly somthing that is realy easy to fix but i cannot see it can anyone see why. <?php $cookie_data="random"; $user = $_POST['name']; $pass = $_POST['pass']; if( $user == "staff"){ if($pass == "password"){ $log = "you are now logged in"; setcookie ("cookie_info",$cookie_data, $time+1800) }else { echo "your password is wrong";} } else{ $log = "you are mot logged in"; } ?> Quote Link to comment Share on other sites More sharing options...
trq Posted November 22, 2007 Share Posted November 22, 2007 Your missing the closing ; on the setcookie line. <?php $cookie_data="random"; $user = $_POST['name']; $pass = $_POST['pass']; if($user == "staff") { if ($pass == "password") { $log = "you are now logged in"; setcookie ("cookie_info",$cookie_data, $time+1800); } else { echo "your password is wrong"; } } else { $log = "you are mot logged in"; } ?> Quote Link to comment Share on other sites More sharing options...
madspof Posted November 22, 2007 Author Share Posted November 22, 2007 I thought it would be something tiny like that lol thanks man all working Quote Link to comment Share on other sites More sharing options...
revraz Posted November 22, 2007 Share Posted November 22, 2007 And your time function is wrong for your setcookie as well. 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.