Dada78 Posted February 1, 2008 Share Posted February 1, 2008 I am getting the error Parse error: syntax error, unexpected ';' but I don't see where their is an unexpected ; that isn't suppose to be there. In is in reference to this line. Here is line 27 where it says the error is at. $email = mysql_real_escape_string($_POST['email']; Here is line 1 to 28 <?php session_start(); // here, we check if the form has been submitted, because we need to handle // redirection before we handle outputting the HTML stuff. if(isset($_POST['submit'])) { if(empty($_POST['email'])) $error = 'Please fill in email field.'; elseif(empty($_POST['password'])) $error = 'Please fill in desired password field.'; else { // MAKE CONNECTION include ('db_connect.php'); // connect to the mysql server $link = mysql_connect($host, $username, $password) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); $error = ""; $email = mysql_real_escape_string($_POST['email']; $pwd = mysql_real_escape_string($_POST['password']; Anyone see anything wrong with the above that I am missing or left out that would cause this error? -Thanks Quote Link to comment https://forums.phpfreaks.com/topic/88815-solved-parse-error-syntax-error-unexpected/ Share on other sites More sharing options...
pocobueno1388 Posted February 1, 2008 Share Posted February 1, 2008 You didn't close the parenthesis. $email = mysql_real_escape_string($_POST['email']); Quote Link to comment https://forums.phpfreaks.com/topic/88815-solved-parse-error-syntax-error-unexpected/#findComment-454891 Share on other sites More sharing options...
pocobueno1388 Posted February 1, 2008 Share Posted February 1, 2008 You didn't for the next line down as well. Quote Link to comment https://forums.phpfreaks.com/topic/88815-solved-parse-error-syntax-error-unexpected/#findComment-454892 Share on other sites More sharing options...
rajivgonsalves Posted February 1, 2008 Share Posted February 1, 2008 this $email = mysql_real_escape_string($_POST['email']; should be $email = mysql_real_escape_string($_POST['email']); you missed one of the brackets. Quote Link to comment https://forums.phpfreaks.com/topic/88815-solved-parse-error-syntax-error-unexpected/#findComment-454893 Share on other sites More sharing options...
Dada78 Posted February 1, 2008 Author Share Posted February 1, 2008 Thank you for your help I see it now. It was a missing bracket that was left out and I missed two. Quote Link to comment https://forums.phpfreaks.com/topic/88815-solved-parse-error-syntax-error-unexpected/#findComment-454897 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.