I need some help creating a "Previous 1 2 3 4 ... Next" type navigation bar for my website.
I have found some online, but have had trouble using them.
Here is my query:
Code: Select all
<?php }
$con = mysql_connect("***","***","***");
if (!$con){die('Could not connect: ' . mysql_error());}
mysql_select_db("***", $con);
$result = mysql_query("SELECT * FROM updates ORDER BY date DESC LIMIT 0, 10");
while($row = mysql_fetch_array($result))
{?>
<div id="comment">
<?php echo $row['date'] ?><br />
<b><?php echo $row['title'] ?></b><?php if ($user->data['user_rank'] == 1 || $user->data['user_rank'] == 2) {?>
<a href="news.php?type=delete&newsid=<?php echo $row['ID'];?>"> | Remove</a>
<?php } ?><br />
<?php echo $row['entry'] ?>
</div>
<?php }
mysql_close($con);
?>What I want is to display 10 results, and under them a navigation bar to navigate through the results.
Thanks in advance!