Jump to content


Photo

Pagination


  • Please log in to reply
3 replies to this topic

#1 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 21 July 2006 - 12:46 AM

Can anyone please tell me how I can display a set number of records per page?

What I want to do is have 5 records displayed on the page at a time and a link to show the next 5 records much like you see on the forum here.

I intend to have lots of news items and if there are about 50 i want a link at the bottom i.e. previous 1 2 3 4 next

I have seen it done on a guestbook script but i don't know enough about php to pick out what i need.

If someone could point me in the right direction I would be grateful
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 21 July 2006 - 01:00 AM

Search for pagination... you should find plenty of examples.

#3 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 21 July 2006 - 01:09 AM

30 seconds on phpfreaks.com yeilded:

http://www.phpfreaks...orials/43/0.php

#4 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 21 July 2006 - 10:54 AM

30 seconds on phpfreaks.com yeilded:

http://www.phpfreaks...orials/43/0.php


I used the tutorial and it does exactly what I want but i noticed if you click the PREV link while on page 1 the usual "Page cannot be displayed" error message appears.  Is there a way you can have the page return to page 1  like it does when you try to move past the last page.

Many thanks in advance
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users