Hello for all
I made a web photo gallary show per pages and I success with that , under the show bar have number of pages every number hyperlinked to the page and this is the code :
$num_query=mysql_query("SELECT * FROM robina_imgs
WHERE Party_Name='$user_fetch[0]'") or die("Error in 2nd query Because ".mysql_error());
$number=mysql_num_rows($num_query);
$pages=$number/20;
$pages=ceil($pages);
$back=$count-10;
echo "<a href=show.php?count=$back><img src=imgs/bul.gif alt=Back border=0></a>";
for ($i=0;$i<$pages;$i++)
{
$countt=10*$i;
printf("<a href=show.php?count=%s> %s </a>",$countt,$i+1);
}
$next=$count+10;
echo "<a href=show.php?count=$next><img src=imgs/bul2.gif alt=Next border=0></a>";
my question is how can I make the bar like in google search limited the pages to ten for exaple : 1 2 3 4 5 6 7 8 9 10
and when be for example on page 5 should be : 5 6 7 8 9 10 11 12 13 14
and when be on page dont be linked same of google
thanks alot