Right now i am working on a user management system. I have a page that lists all of the users, but i only want it to show 20 users at a time with a link to go forward and backwards to see more users. How do I select a range of data from a mysql table? For example how would I output users 21-40?
I have a feeling that I am missing something that couldnt be more obvious.
Anyways, how can it be done?
-Matt
PHP Code:
$newest2 = @mysql_query("select * from users order by id asc");
echo "<b>Members:</b><br><br>";
$a = 0;
while($user = @mysql_fetch_array($newest2))
{
$a++;
echo "$a [ <a href='index.php?p=profiles&uid=$user[id]'>$user[username]</a> ]<br>";
}
Anyways, how can it be done?
-Matt
Comment