Hello All!
Say I have a musical rating/search system and based on how many 'hits' (matches with the searched text vs the database), that decides wherether or not it will be displayed.
The problem is, I need to paginate this page but I cant just use $_GET because the $_POST info from the Search form still needs to be available.
Any suggestions on how to paginate and still keep the POST data?
Thanks!
*My god its hot here, even in Boston!*
Pagination where POST is critcal
Moderator: General Moderators
Store the POST data in a session
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Pagination where POST is critcal
There are a couple of options:
- store the posted data in a form on the paginated page (and make sure the pagination links submit the form... thus use buttons instead of hyperlinks to do the navigation)
- append the posted data to the urls
- use sessions (which is an optimised version of the two options mentionned above)
- store the posted data in a form on the paginated page (and make sure the pagination links submit the form... thus use buttons instead of hyperlinks to do the navigation)
- append the posted data to the urls
- use sessions (which is an optimised version of the two options mentionned above)
You may be able to use POST and GET at the same time depending on your design..
Code: Select all
<form name="example" method="POST" action="yourPage.php?page=3&this=that?">
<input ... />
</form>