auris Posted February 14, 2004 Share Posted February 14, 2004 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 ?> Quote Link to comment https://forums.phpfreaks.com/topic/1670-advanced-paging/ Share on other sites More sharing options...
morpheus.100 Posted February 26, 2004 Share Posted February 26, 2004 Several free extensions available in macromedia exchange that will write this code for you. Also a useful chapter in the manual if i remember correctly so press F12 and look in creating navigation. Quote Link to comment https://forums.phpfreaks.com/topic/1670-advanced-paging/#findComment-5545 Share on other sites More sharing options...
pearl8379 Posted March 1, 2004 Share Posted March 1, 2004 check the tutorials....i get some idea of paginating from there..well, couldnt remember the tutorial number, but i bet you'll find it 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... Hope that'll help... cheers.. Quote Link to comment https://forums.phpfreaks.com/topic/1670-advanced-paging/#findComment-5565 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.