You add a limit to you're database query.
Code:
if ($_GET['limit'] == '') {
$limit = 0;
}
$limitend = $limit+50; //the number would be the number of entries per page
$sql = "SELECT * FROM user ORDER BY id LIMIT $limit, $limitend";
Then to display the number of pages, you get the total number of entries and divide it by the entries per page.
Code:
$pages = $totalpages/50;
if ($totalpages % 50 != '0') {
$pages++;
}
Now that you have your number of pages you just use a for loop and make a link for each page.
Code:
for ($page = 1; $page < $pages; $page++) {
Print "<a href=\"page.php?limit=$limitend\">$page</a>";
$limitend = $limitend+50;
}
I hope I understood correctly and I hope this helps.