Jump to content

View more Link on Dynamic page


denoteone

Recommended Posts

I have a template that I want to load article teasers into but only 3 at a time and if the total number of articles in more then three create a "next" button.

 

My thoughts... are to use Sessions to store the current article count and then when you click the "view More" or "back" link have it refresh the page and pass a variable "add" or "sub" in the url. This will tell the script to add 3 or remove 3 from the variable stored in the session.  So when I loop through and print out the articles it prints the right ones.

 

Also should I store my sql query return in a session variable so i dont have to keep accessing the database?

 

Any thought or ideas would help. 

Link to comment
https://forums.phpfreaks.com/topic/190923-view-more-link-on-dynamic-page/
Share on other sites

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.