I've come across a problem - but any help would be appreciated.
When I query the database using the results posted from a form, the pagination works initially i.e. for the first 10 records but when I click on the 2 hyperlink for the second page of results it loses the $_POST variable and returns to the full data set with the undefined index error at the top.
What is the best way of keeping these variables available for the second (and further) pages? I've messed around with $_SESSION variables but can't quite get it to work.
1 reply to this topic
#1
Posted 01 April 2011 - 04:17 AM
|
|
|
#2
Posted 02 April 2011 - 08:26 AM
You should link to page.php?page=2 (and access it through $_GET,) when they click the second link, or even &items=12 if they selected they wished a certain amount of items per page, this is fairly standard and makes more sense if they want to bookmark the page for later.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









