This is a pagination I made for one of my projects. Feel free to use it;
PHP Code:
if(!@$_GET['p'])
$Page = 1;
else
$Page = @$_GET['p'];
$FirstLimit = ($Page - 1) * 10;
$SecondLimit = 10;
$Query = mysql_query("YOUR QUERY HERE LIMIT ".$FirstLimit.", ".$SecondLimit);
$Fetch = mysql_fetch_array($Query);
$Count = mysql_num_rows(mysql_query("YOUR QUERY HERE"));
$Max_Pages = ceil($Count/10);
echo '<center>
Page '.$Page.' of '.$Max_Pages.'
<br />
';
for($i = 1; $i != $Max_Pages + 1; $i++)
{
echo '<a href="SITE URL?p='.$i.'">'.$i.'</a> ';
}
echo '</center>';
Enjoy,
-BGxApixen