Jump to content

Archived

This topic is now archived and is closed to further replies.

AdRock

Pagination

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

Share this post


Link to post
Share on other sites
Search for [i]pagination[/i]... you should find plenty of examples.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.