Basically I have a form that submits a info into a mysql database table then displays it in a table located @ http://burtonmonster.com/list.php but I'd like to only display the latest 20 entries into the table so that there won't have to load like 100 entries basically it'll just keep displaying entries forever on 1 page.. No clue how to add pagination into my code.
<?php
$con=mysqli_connect("localhost","burtonmo_skype","PasswordSNIPPED","burtonmo_skype");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM users");
echo "<table class='table table-striped table-bordered' border='1'>
<tr>
<th>Username</th>
<th>Site</th>
<th>Age</th>
<th>Gender</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['username'] . "</td>";
echo "<td>" . $row['bio'] . "</td>";
echo "<td>" . $row['age'] . "</td>";
echo "<td>" . $row['gender'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>