Jump to content

[SOLVED] Parse error: syntax error, unexpected ';'


Dada78

Recommended Posts

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.