Previous and Next Buttons

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
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Previous and Next Buttons

Post by icesolid »

I was wondering how to create previous and next buttons for data in a mysql database. Limiting results to 10 per page.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Code: Select all

?limit=10&offset=10
Would be page two then, right? You use "offset" to scroll through data, use hyperlinks to link to the current offset + 10 and - 10.

If you need more explanation, ask.
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Help

Post by icesolid »

Could you explain that better or possibly show me some sample code?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Look in the Code Snipplets forum for MYSQL pagination class, assuming you are using a mysql db ;)
Post Reply