PHP : Parse error: syntax error, unexpected $end
<p>I keep having a syntax error, unexpected $end.</p>

<p>I checked my code, but there's nothing wrong. I checked all the opening and closing brackets. What seems to be the problem?</p>

<p>My code:</p>

<pre><code>&lt;?php
setcookie('name',$_POST['name']);

setcookie('lname',$_POST['lname']);

setcookie('add',$_POST['add']);

setcookie('age',$_POST['age']);

setcookie('contact',$_POST['contact']);

setcookie('email',$_POST['email']);

setcookie('user',$_POST['user']);

setcookie('pass',$_POST['pass']);


$con=mysql_connect("localhost","root","");
mysql_select_db("nnx",$con);

$tbl=mysql_query("SELECT * FROM tablename WHERE `username` =         '".mysql_real_escape_string($_POST['user'])."'");
while($row=mysql_fetch_array($tbl))
{

if($_POST['user']==$row['username'])
{
    header("location: /register.php?codeErr2=1");
        die;
}

$name=$_POST['name'];
$lname=$_POST['lname'];
$add=$_POST['add'];
$age=$_POST['age'];
$contact=$_POST['contact'];
$email=$_POST['email'];
$user=$_POST['user'];
$pass=$_POST['pass'];

if(($name!="")&amp;&amp;($lname!="")&amp;&amp;($add!="")&amp;&amp;($age!="")&amp;&amp;($contact!="")&amp;&amp;($email!="")&amp;&amp;    ($user!="")&amp;&amp;($pass!=""))
{
    $value=mysql_query("INSERT INTO tablename(name, lastname, address, age, contact,     email, username, password)
VALUES     ('".$_POST['name']."','".$_POST['lname']."','".$_POST['add']."','".$_POST['age']."','".$_PO    ST['contact']."','".$_POST['email']."','".$_POST['user']."','".$_POST['pass']."')");
}

else
{
    header("location: /register.php?codeErr=1");    
}


?&gt;

&lt;html&gt;
&lt;body bgcolor="green"&gt;
&lt;center&gt;

&lt;h1&gt;Welcome! These are the offered products&lt;/h1&gt;
&lt;table border="1" width="1000" height="500" bgcolor="yellow"&gt;
&lt;tr&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GARLIQUE&lt;/td&gt;
&lt;td&gt;GARLIQUE
The All Natural Dietary Supplement
Produced from fresh garlic

&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right-CEE&lt;/td&gt;
&lt;td&gt;Right-CEE (Sodium Ascorbate) …

&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OLEIA&lt;/td&gt;
&lt;td&gt;OLEIA CAPSULE
No More Pain, Heart to Gain


&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;br&gt;
&lt;form name="product" action="order.php" method="post"&gt;
&lt;input type="submit" value="Order"&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
