Jump to content

Advanced paging


Recommended Posts

hi all, does anybody know how to make previous 1 2 3 next links? in macromedia forums i found a script previous-0-1-2-3next links, bu there are two problems:0 is at the beginning and next link sometimes doesn't work! here's the script:

 

<?php if ($pageNum_Rs1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Rs1=%d%s", $currentPage, max(0, $pageNum_Rs1 - 1), $queryString_Rs1); ?>">Previous</a> <?php } // Show if not first page ?><?php for($i = 0; $i <= $totalPages_Rs1; $i++){ if(($pageNum_Rs1) == $i){ echo "<strong><font color=#FF0000>$i </font></strong>"; } else { echo "<a href=\"".$_SERVER['PHP_SELF']."?pageNum_Rs1=$i\">$i</a> "; } } ?> <?php if ($pageNum_Rs1 < $totalPages_Rs1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Rs1=%d%s", $currentPage, min($totalPages_Rs1, $pageNum_Rs1 + 1), $queryString_Rs1); ?>">Next</a> <?php } // Show if not last page ?>

 

Link to comment
https://forums.phpfreaks.com/topic/1670-advanced-paging/
Share on other sites

  • 2 weeks later...

check the tutorials....i get some idea of paginating from there..well, couldnt remember the tutorial number, but i bet you'll find it :lol:

 

ohya...i did post a question regarding pagination in one of the forum..but i'm not sure whether you detect the question using my username...i didnt register myself that time...but using the same username though... :o

 

Hope that'll help...

cheers..

Link to comment
https://forums.phpfreaks.com/topic/1670-advanced-paging/#findComment-5565
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.