Jump to content

Archived

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

Ph0enix

lots of page.

Recommended Posts

Ok, im creating a website where people will be able to submit things and they will go into my database. Then i want to get those and put them into my website so it displays it like.

Name: (NAME)
Age: (AGE)
Link: (LINK)

And i want to display 20 of these on a page with different infomation and then go onto another page.
What would be the best way that i could do this, and could anybody write me a script to do this.

The only way i could think of doing this is by selecting 1-20 items by there ID number on one page, and thencreate several; pthers with 21-40 and 41-60 and so on. and then at the bottom of the page you a switch statement and count how many things i have put into a table and for how many things i have in the database depends on how many pages should show. So if there are 47 then at the bottom of the page it would output Page 1 Page 2 and Page 3.

Is this the best way to do this. If not could someone help me write the script please. Thanks 

Share this post


Link to post
Share on other sites
Yes you can do this. What you'll want to search for is Pagination Tutorials. There are thousands of them out there. Also we wont write scripts for people eaither. We'll provide code snippets but not a fully functional script. [url=http://www.php-mysql-tutorial.com/]This site here[/url] will be able to help in doing so. If you run through tutorial numbers 3 throught to 9 whcih will teach you on how to use PHP and MySQL toggether. Tutotial number 8 is where you learn to add pagination.

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.