Next Page and Previous Function

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
ravx
Forum Commoner
Posts: 26
Joined: Sat Aug 02, 2008 6:13 pm

Next Page and Previous Function

Post by ravx »

Hi, I was wondering how can i make a page list x amount of things and than shows the next Page> and <previous and etc feature.

Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Next Page and Previous Function

Post by Christopher »

Search these forums for 'pagination' or 'paginate'
(#10850)
User avatar
deejay
Forum Contributor
Posts: 201
Joined: Wed Jan 22, 2003 3:33 am
Location: Cornwall

Re: Next Page and Previous Function

Post by deejay »

'pagination' is probably what your looking for, although you give very little information in your post. If you search for that term on these forums or on the net you'll find loads of stuff

If your working from mysql , i'd use some sort of offset on your mysql query.

Code: Select all

 
$selectquery .= " LIMIT $limit OFFSET $offset "; 
 
ravx
Forum Commoner
Posts: 26
Joined: Sat Aug 02, 2008 6:13 pm

Re: Next Page and Previous Function

Post by ravx »

deejay wrote:'pagination' is probably what your looking for, although you give very little information in your post. If you search for that term on these forums or on the net you'll find loads of stuff

If your working from mysql , i'd use some sort of offset on your mysql query.

Code: Select all

 
$selectquery .= " LIMIT $limit OFFSET $offset "; 
 
Hi yh thats right im using mysql to display listing, so i need like x amount per page and than the navigation to the other listing via the previous and next.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Next Page and Previous Function

Post by jayshields »

I recently posted this, which should be of some help. You should really search before making a new post.
ravx
Forum Commoner
Posts: 26
Joined: Sat Aug 02, 2008 6:13 pm

Re: Next Page and Previous Function

Post by ravx »

jayshields wrote:I recently posted this, which should be of some help. You should really search before making a new post.
Sorry but i didnt know what this technique was called.
Post Reply