Jump to content

Pagination


AdRock

Recommended Posts

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. [color=blue]previous 1 2 3 4 next[/color]

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
Link to comment
Share on other sites

[quote author=hitman6003 link=topic=101320.msg400923#msg400923 date=1153444173]
30 seconds on phpfreaks.com yeilded:

http://www.phpfreaks.com/tutorials/43/0.php
[/quote]

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.