Forum Moderators: coopster
First previous 1 2 3 4.. Next Last,
but dreamweaver only let you do a navigation bar as following
First previous Next Last,
say if I want each page display 9 records, how to do PHP code to let page count the total records and creat a page navigation bar with page numbers.
If anyone could help?
Thank you!
$count = count($records);
<?php for ($i = 0; $i <= $count; $i++) { ?>
<a href="http://www.example.com?record_id=<?php echo $record[$i]['id'];?>"><?php echo $i+1;?></a>
<?php } ?>
Something like that should get you on your way. Beware that your first record will be $record[0] so you will have to work around that too!
then you use $_GET['id'] to retrieve the details of specific record with mysql and display it on that page.
[edited by: Pico_Train at 2:33 pm (utc) on Jan. 12, 2009]