I suggest you create a backup copy first, then
Replace
$q = "select url from faver";
with
$q = "select url from faver limit $start,20";
Then in the place where you want your page numbers, put this:
$pn=0;
echo "<br>Pages: ";
$tmsgs=mysql_num_rows(mysql_query("SELECT url FROM faver"));
if ($start<>0)
{
$numap=$start-20;
echo "<a href='?start=$numap'>";} echo"Previous Page</a> | "; //change link
while($tmsgs-$num>0){
$pn++;
if ($num<>$start)
{
echo "<a href='?start=$num'>$pn</a> | "; //change link
}
else
{
echo "$pn | ";}
$num+=20;
}
$numa=$start+20;
if ($tmsgs-$numa>0)
{
echo"<a href='?start=$numa'>";} echo"Next Page</a>"; //changelink
}}
If you have anyother query strings in the URL that need to be carried, add them on the lines where I've written changelink.
I'm fairly sure this should work, as it works for me, but no guarentees!
Let me know if it works.