Jump to content

Next Page


Mememe

Recommended Posts

Well, I'm not sure how to go about doing this.How would I have it so, after a certain number of posts are displayed, it the next set of posts are showed on another page. For example, if the maximum number of posts for one page is 5, and there were 15 posts in all, there would be a file called "view.php?page=1"And that would show the first 5 posts (meaning first 5 rows from the table in the database). Then when someone clicks on a link that goes to view.php?page=2", it would show the next 5 posts. And there would be another link, linking to view.php?page=3. That link would show the last 5 posts. And so on.Thanks, Mememe. :)

Link to comment
Share on other sites

I idea I had was first find the amount of pages. Then for every encode the page number into the url. The problem is that how would I select 5 rows, for page 2?So, for page 1, I would select the rows 1-5. Then for page 2, I would need to select rows 6-10. How would I do that?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...