Displaying page numbers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
grudgeuk
Forum Newbie
Posts: 8
Joined: Fri Apr 07, 2006 6:27 am

Displaying page numbers

Post by grudgeuk »

Sorry for the crap subject name.

Basically I have a page on my website that shows accommodation, now I need to add more accommodation details so want a second page, and possibly a third, sure you get the picture. All my accommodation details are in a mysql table and getting the correct records is not a problem, what I need to do is display the page numbers, then when someone clicks on one it displays the correct information. I will display 4 records per page, so on page 1 will have 1 - 4 and page 2 will have 5 - 8 etc. So any idea how I go about doing this in PHP, I think I need two PHP scripts, one to look after the page numbers and one to look after displaying the information. Any advice would be appreciated.

BTW this is what it currently looks like - http://www.ruthinweather.co.uk/accommodation.php
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

We've discussed this topic countless times. Search for "pagination."
Post Reply