Automatically Add Pages

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
rrtr0628
Forum Newbie
Posts: 3
Joined: Sat Jan 09, 2010 5:28 pm

Automatically Add Pages

Post by rrtr0628 »

hello,

i'm trying to let my website members upload their content to a universal page, but the issue is when a page reach about 10 contents, i want to move the older contents to page 2 and 3 ...ect like forums and blogs...any idea how to do that please???
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Automatically Add Pages

Post by Jade »

You need to use pagination. Basically you store all of the user uploaded content in a database and then you query that database for the top x number of results. Based on the total rows in the table you can calculate the number of pages and then display posts on each of those pages.
rrtr0628
Forum Newbie
Posts: 3
Joined: Sat Jan 09, 2010 5:28 pm

Re: Automatically Add Pages

Post by rrtr0628 »

Thank you :)
Post Reply