Jump to content

Displaying only 4 records from a DB and having a Next and Prev buttons


craigtolputt

Recommended Posts

Hi Guys,

 

I have a news system where the admin can add/edit and delete news items.  I really need to find out how to display only 4 news items per page and then have a next and prev links to display the next 4 on a different page and so on.

 

does anyone know how to do this please?

Yes, you need to search for a "pagination" script and give it a try. If you can't get it to work, you can ask for help with any specific problems you have. I could give you a pagination script, but when I researched this myself, I found I could do it myself, and I learnt a lot. :) Sorry for being no help.

nice one thanks,  Ive done a search and found a good one.

 

Its easy when you know the terminology but im a newbie so please bare with me...

 

i tried this first but cant figure the damn thing out http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html

Good start. :) If you keep searching you can find good tutorials where they'll explain each bit of code one step at a time, so you will understand it. You'll be able to style the page numbers nicely too with CSS to look like some major websites such as digg.com etc.

I think this isnt what i was looking for as it requires me to seperate the large content into divs.

 

i need to dynamically get the number of records from a database then only display 4 per page and have dynamic links made according to the number or total records it needs to display.

Archived

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

×
×
  • 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.