I get this error Parse error: parse error, unexpected $ in /home/nathanm/public_html/updateResult.php on line 68
line 68 is the line right after the close ?> does anyone know why? I am trying to print out my table with a while loop but i am getting stuck.
<?php
$sql = "SELECT * FROM 2004Results WHERE 1";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
echo "<table border=1>\n";
echo '<tr><th bgcolor="#CCCCFF">Bib</th>
<th bgcolor="#CCCCFF">FirstName</th>
<th bgcolor="#CCCCFF">LastName</th>
<th bgcolor="#CCCCFF">Address</th>
<th bgcolor="#CCCCFF">City</th>
<th bgcolor="#CCCCFF">State</th>
<th bgcolor="#CCCCFF">Zip</th>
<tr>';
echo '</table>';
print "<table>"; // start the table
while ($row = mysql_fetch_array($result))
{
//this loops for as many records as the query finds
echo "<tr>";
echo "<td>".$row[0]."</td>"; // 1st colum from db
echo "<td>".$row[1]."</td>"; // 2nd colum from db
echo "<td>".$row[2]."</td>"; // 3rd colum from db
echo "<td>".$row[3]."</td>"; // 4th colum from db
echo "</tr>";
echo "</table>"; // Finish table.
?>
</body>
</html>
<?php
mysql_free_result($result);
?>