Forums

PHP

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>&lt;?php


for($i = 1; $i &lt;= $totalPages_gal2; $i++){
if(($pageNum_gal2) == $i){
echo "&lt;strong&gt;&lt;font color=#FF0000&gt;$i&nbsp;&lt;/font&gt;&lt;/strong&gt;";
} else {
echo ("&lt;a href=\"$PHP_SELF?pageNum_gal2=$i\"&gt;$i&lt;/a&gt;&nbsp;";
}
}
?&gt;</font id=code></pre id=code>

any help would be much appreciated.

Edited by - TemprateRage on 10 Jul 2004 08:21:17

Reply to this topic