Jump to content

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


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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.