PHP t_variable error
<p>I wonder if someone can spot my error?</p>

<blockquote>
  <p>Parse error: syntax error, unexpected T_VARIABLE in public_html/sign_up.php on line 14</p>
</blockquote>

<p>For the life of me I cannot figure out what i have done wrong. You'll have to forgive my ignorance, I'm still trying to learn.</p>

<pre><code>include_once("../php/sign_up/connect_db.php");
// array for JSON response
$response = array();

// check for required fields
if (isset($_POST['firstname']) &amp;&amp; isset($_POST['surname']) &amp;&amp; isset($_POST['postcode'])&amp;&amp; isset($_POST['email']) &amp;&amp; isset($_POST['phone'])

$firstname = $_POST['firstname'];
$surname = $_POST['surname'];
$postcode=$_POST['postcode'];
$email = $_POST['email'];
$phone=$_POST['phone'];

// connecting to db
$db = new DB_CONNECT();

// mysql inserting a new row
$result = mysql_query("INSERT INTO TABLE 1(firstname, surname, postcode, phone, email) VALUES('$firstname', '$surname', '$postcode', '$phone', '$email')");

// check if row inserted or not
if ($result) {
    // successfully inserted into database
    $response["success"] = 1;
    $response["message"] = "Thank you for registering.";

    // echoing JSON response
    echo json_encode($response);
} else {
    // failed to insert row
    $response["success"] = 0;
    $response["message"] = "Oops! An error occurred.";

    // echoing JSON response
    echo json_encode($response);
}
} else {
// required field is missing
$response["success"] = 0;
$response["message"] = "Required field(s) is missing";

// echoing JSON response
echo json_encode($response);
}
?&gt;
</code></pre>

<p>Any help would be greatly appreciated.</p>

<p>Kind regards,
Mark</p>
