Pagination numbering of list pages

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
mccommunity
Forum Commoner
Posts: 62
Joined: Mon Oct 07, 2002 8:55 am

Pagination numbering of list pages

Post by mccommunity »

I am pulling a list of about 10,000 items. There are 25 items to display on the page at a time. I would like to ad page numbering at the top. I am able to add page numbering at the top fine but if there are 100 pages it displays page 1 - page 100 which takes up the whole screeen. I would like for whever it is over ten to display page 20 page 30 page 40 etc. then when you click on 40 it adjusts the page sets accordingly. I am not sure how to do this though. Can anyone help?
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

Are you pulling that list from a mysql database? if so, you can use the LIMIT keyword combined maybe with php sessions to keep track of stuff. I believe there's a tutorial on page pagination on http://www.phpfreaks.com/tutorials/73/0.php
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

andre took the words right out of my mouth
Post Reply