Jump to content

lots of page.


Ph0enix

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 
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.