Jump to content


Prev/Next button logic on a form when limiting results to 30...

  • Please log in to reply
1 reply to this topic

#1 thepip3r

  • Members
  • PipPipPip
  • Advanced Member
  • 289 posts

Posted 11 July 2006 - 09:12 PM

i have a form to search a db for certain information that writes to the $_POST superglobal and by default, the search results are limited to a $_GET['offset'] and $_GET['limit'] (which are set to 0,30 if they have not been otherwise set).  is there an easy way to repass the search parameters in $_POST back to the web browser when the user clicks Next or Prev? Right now when they click Next and Prev, the $_GET vars are passed correctly but nothing appears on the screen because $_POST['search'] is no longer set.  all help would be greatly appreciated.

#2 gewthen

  • Members
  • PipPip
  • Member
  • 11 posts

Posted 13 July 2006 - 03:25 AM

You would need to carry the search term in the query string (the string after the ? in the url) across all the pages that need it or store the value in a session variable if you do not want the query term displayed in the url. Putting term into the $_POST is not possible unless you insert the term as a hidden field in a form and have the next and previous buttons form submissions. It just seems sloppy to have a form for the next and previous functionality and I recomend against it (if my recomendation means anything).

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users