Forums
This topic is locked
PHP/mysql page numbering
Posted 10 Jul 2004 07:47:53
1
has voted
10 Jul 2004 07:47:53 Chase Rage posted:
Im setting up a image gallery for my website. I have the gallery seperated into 2 talbes. one talbe to show categoryes, and the other table to show images/info. i manged to have it show the number of pages there are like 1 .. 2 .. 3 .. ect, and it shows what page you are on. but i want people to bealbe to click on the number and go to that page. i have the link for the page set up as (*a href=\"".$_SERVER['PHP_SELF']."?pageNum_recordset=$i\">$i</a* )but that dosent work. I belive it is because i have the page set up to show only images with the correct cateogry link, ( i used the BRB PHP Behaviors - Conditonal Region extension so that it only shows images that have a certain category ID )
now im not sure how i set up the link to go to the page with the corect category id.
This is the exact code im using for the pagination <pre id=code><font face=courier size=2 id=code><?php
for($i = 1; $i <= $totalPages_gal2; $i++){
if(($pageNum_gal2) == $i){
echo "<strong><font color=#FF0000>$i </font></strong>";
} else {
echo ("<a href=\"$PHP_SELF?pageNum_gal2=$i\">$i</a> "
}
}
?></font id=code></pre id=code>
any help would be much appreciated.
Edited by - TemprateRage on 10 Jul 2004 08:21:17