PDA

View Full Version : Navigating records


trojan
09-26-2002, 01:59 PM
Hey peeps,

i have a table with 10,000 rows. i have managed to display 20 records at a time with use of next and prev. I also have a page numbers that appear at the bottom so users can click directly onto a specific page. How do i do what codingforum has done and only display about 6 page numbers and then dissappear and appear when they are needed

trojan
09-26-2002, 02:04 PM
for ($i=1; $i <= $pages; $i++){
$ppage = $limit*($i - 1);
if ($ppage == $page){

echo " $i "; }
else{

echo "<a href=\"$PHP_SELF?query=$query&page=$ppage&limit=$limit\"> $i </a>";}
}

this is the code used to display the page numbers