I am trying to display a table onto a html page that contains users SQL data.
Assume I can connect and there is information in the table.
<?php
echo "<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Hair Color</th>
</tr>";
$result = mysql_query("SELECT * FROM `table`");
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" .$row['first']."</td>";
echo "<td>".$row['last']."</td>";
echo "<td>".$row['color']."</td>";
echo "</tr>";
}
echo "</table>";
echo "<input type="button" value="updateTable" id="btn">";
?>
Where am I going wrong because no data is being output?