Parse error: syntax error, unexpected T_STRING

Reply

Join Date: Oct 2008
Posts: 2
Reputation: AnjX is an unknown quantity at this point 
Solved Threads: 0
AnjX AnjX is offline Offline
Newbie Poster

Parse error: syntax error, unexpected T_STRING

 
0
  #1
Oct 26th, 2008
I get this error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/pixogeni/public_html/arcade/admin/commandcenter.php on line 46

Well this is line 46, I can't seem to figure out a fix for it...

if (isset($_GET['p']) && $_GET['p'] == "login") {


Any suggestions?
Thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 1,613
Reputation: scru has a spectacular aura about scru has a spectacular aura about 
Solved Threads: 130
Featured Poster
scru's Avatar
scru scru is offline Offline
Posting Virtuoso

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #2
Oct 26th, 2008
Suggestion: check the previous line and make sure its statement was terminated correctly. The line if (isset($_GET['p'] && $_GET['p'] == "login"){} parses fine on my server.
Last edited by scru; Oct 26th, 2008 at 6:15 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: AnjX is an unknown quantity at this point 
Solved Threads: 0
AnjX AnjX is offline Offline
Newbie Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #3
Oct 26th, 2008
} else {
echo "<p>This page requires authentication. Please login.</p>";
exit;
}
}

if (isset($_GET['p']) && $_GET['p'] == "login") {
if ($_POST['name'] != $reg_user) {
echo "<p>Sorry, that username does not match. Use your browser back button to go back and try again.</p>";
exit;
} else if ($reg_pass != sha1($_POST['pass'].$regsalt)) {
echo "<p>Sorry, that password does not match. Use your browser back button to go back and try again.</p>";
exit;
} else if ($_POST['name'] == $reg_user && sha1($_POST['pass'].$regsalt) == $reg_pass) {
setcookie('amcms3admin', $reg_pass);
header("Location: $_SERVER[PHP_SELF]");
} else {
echo "<p>Sorry, you could not be logged in at this time. Refresh the page and try again.</p>";
}
}
?>

This page is not directly accessable.




Thats the area around it, I still don't see anything wrong though ....
Last edited by AnjX; Oct 26th, 2008 at 7:38 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC