Hello everyone.
I currently have a while loop that pulls all members to a page if the username begins with the selected letter. We have a lot of members now and the "usernames beginning with "a" are quite alot. So i need to be able to have a way to LIMIT to about 20 usernames then add a "new page" at the bottom. e.g i want like this at the bottom:
Page: 1 - 2 - 3 - 4 - 5 - 6, etc
And these are linked to the same page so the php code can list the next 20 members...
Here is my code at the minute and thank you very much in advance:
<?php
$letter = $_GET['sort'];
if(!isset($letter)) {
$letter = "a";
}
$lettercombo = "$letter%";
$select = mysql_query("SELECT * FROM users WHERE username LIKE '$lettercombo' ORDER by username");
while($fetch = mysql_fetch_array($select)) {
?>
<tr>
<td><a style="color:#5b9600; font-weight:bold; text-shadow:0px 1px 0px #fff;" href="viewuser.php?user=<? echo $fetch['username']; ?>"><? echo $fetch['username']; ?></a></td>
<td><? echo $fetch['gamertag']; ?></td>
<td><? echo $fetch['joined']; ?></td>
</tr>
<? } ?>