Re: [PHP] Keeping POST values when paging

This is a discussion on Re: [PHP] Keeping POST values when paging within the PHP General forums, part of the PHP Programming Forums category; ---- "Mayer wrote: > Hiya all, > > I have coded a PHP site on an intranet which forms a ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-07-2008
Wolf
 
Posts: n/a
Default Re: [PHP] Keeping POST values when paging

---- "Mayer wrote:
> Hiya all,
>
> I have coded a PHP site on an intranet which forms a MySQL query based on
> multiple inputs on a large form. The form results are POSTed back to itself,
> and query is formed, and the results are returned from the database and
> echoed.
>
> I am looking to set up a basic paging system (back/next, jump to page 3,
> etc) in order to limit results for efficiency.
>
> The problem I get is that my "next" link - something like
> href='resultspage.php?page=2' - naturally reloads the page without all the
> POST variables it needs to recreate the query.
>
> Is there some way of forcing the page to remember and reload the POST
> variables when clicking "next"? Or, if that's difficult, can anyone suggest
> a good way of addressing this problem without too much recoding? I'm sure
> there must be a neater way of doing it then simply passing 30 or so
> variables using GET.
>
> Many thanks in advance.
> Jon.



Set session variables, have the script check the session variables.

That'll keep the pages rolling, shouldn't take much coding, and you can change some things on-the-fly.

HTH,
Wolf
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0