creating dynamic url's with next and previous page

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
User avatar
soianyc
Forum Commoner
Posts: 61
Joined: Wed Mar 30, 2005 2:48 pm
Location: NY

creating dynamic url's with next and previous page

Post by soianyc »

Noob to php\mysql. So far ive been able to create a table, insert data using a form and read that data. What i would like to do is make the data appear 5 at a time on the page, with next and previous buttons for the other records. What course of action should i take for this???

Thanks
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

search "pagination" on these forums..

we also have a code snipplet available in the Code Snipplet forum
User avatar
soianyc
Forum Commoner
Posts: 61
Joined: Wed Mar 30, 2005 2:48 pm
Location: NY

Post by soianyc »

Thanks, for that. Ive been searching around for some good tutorials on pagination, any in particular that you know of????
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

http://www.phpfreaks.com/tutorials/43/0.php

I went through that and picked up some stuff.
User avatar
soianyc
Forum Commoner
Posts: 61
Joined: Wed Mar 30, 2005 2:48 pm
Location: NY

Post by soianyc »

Thanks for the link. I think i got the code to work, but a new question has arose. My data that i want paginated is not showing up??? does this have anything to do with the $php_self tag????
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

try changing it to $_SERVER['PHP_SELF'] but I don't think that would be the cause.
Post Reply