I'm trying to make a table connected to my database so I can use the information in that database.
I think I'm on the right way, but currently the table only displays the first row. Anyone got any ideas on what's going on?
<table id="fairtable">
<tr>
<td>Fair Name</td>
<td>Date</td>
<td>Are we there?</td>
<td>Website</td>
</tr>
<?php
$sql = "SELECT `name`,`date`,`present`,`website` FROM `dates`";
$results = mysqli_query($conn,$sql);
while($rowitem = mysqli_fetch_array($results)) {
echo "<tr>";
echo "<td>" . $rowitem['name'] . "</td>";
echo "<td>" . $rowitem['date'] . "</td>";
echo "<td>" . $rowitem['present'] . "</td>";
echo "<td>" . $rowitem['website'] . "</td>";
echo "</tr>";
}
?>
</table>