Jump to content


Photo

lots of page.


  • Please log in to reply
2 replies to this topic

#1 Ph0enix

Ph0enix
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 01 July 2006 - 09:46 AM

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 
[url=http://www.slimphoenix.com][/url]

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 July 2006 - 10:11 AM

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. This site here 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.

#3 Ph0enix

Ph0enix
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 01 July 2006 - 11:35 AM

Ok Thank you.
[url=http://www.slimphoenix.com][/url]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users