Parse error: syntax error, unexpected 'if' (T_IF) in D:\Xampp\htdocs\profile\new\view.php on line 29 : <p>I am getting parse error unexpected IF (T_IF). please help me correcting my code 
i have session_start() before  tag and using session username for selecting row from database. please help me my code is not working properly</p>

<p><strong>PHP CODE</strong></p>

<pre><code>&lt;?php
// connect to the database
include('connect-db.php');
$username = $_SESSION['username']
// get the records from the database
if ($result = $mysqli-&gt;query("SELECT * FROM user WHERE username = '$username'"))
{
// display records if there are records to display
if ($result-&gt;num_rows &gt; 0)
{
// display records in a table
echo "&lt;table border='1' cellpadding='10'&gt;";

// set table headers
echo "&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;First Name&lt;/th&gt;&lt;th&gt;Last Name&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;";

while ($row = $result-&gt;fetch_object())
{
// set up a row for each record
echo "&lt;tr&gt;";
echo "&lt;td&gt;" . $row-&gt;id . "&lt;/td&gt;";
echo "&lt;td&gt;" . $row-&gt;firstname . "&lt;/td&gt;";
echo "&lt;td&gt;" . $row-&gt;lastname . "&lt;/td&gt;";
echo "&lt;td&gt;&lt;a href='records.php?id=" . $row-&gt;id . "'&gt;Edit&lt;/a&gt;&lt;/td&gt;";
echo "&lt;td&gt;&lt;a href='delete.php?id=" . $row-&gt;id . "'&gt;Delete&lt;/a&gt;&lt;/td&gt;";
echo "&lt;/tr&gt;";
}

echo "&lt;/table&gt;";
}
// if there are no records in the database, display an alert message
else
{
echo "No results to display!";
}
}
// show an error if there is an issue with the database query
else
{
echo "Error: " . $mysqli-&gt;error;
}

// close database connection
$mysqli-&gt;close();

?&gt;
</code></pre>
