Re: Keeping POST values when paging
| From: | Thiago H. Pojda | Date: | Tue, 08 Jul 2008 19:42:50 +0000 |
| Subject: | Re: Keeping POST values when paging | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276455@lists.php.net to get a copy of this message | ||
On Tue, Jul 8, 2008 at 4:11 PM, Philip Thompson <philthathril@gmail.com>
wrote:
> On Jul 8, 2008, at 12:32 PM, tedd wrote:
>
> At 4:18 PM +0100 7/8/08, Mayer, Jonathan wrote:
>>
>>> In the end I decided the simplest way of coding the functionality was to
>>> do
>>> something similar to what Eric said, and have some extra submit buttons
>>> in
>>> the form, called Next, Previous and Jump. When clicked, they each
>>> submitted
>>> the form again with a different flag set. Along with a session variable
>>> storing the "current" page, I was able to code a reasonably neat solution
>>> deciding which results to show without having to rewrite any sections of
>>> my
>>> code. Because these submit buttons are tied to a form at the top of the
>>> page, this has limited me to only having the navigational buttons at the
>>> top
>>> of the results table rather than at the bottom too, but that is perfectly
>>> fine in my situation.
>>>
>>
>> Jon:
>>
>> Actually, you don't need to use sessions, post, nor get to pass variables
>> between scripts.
>>
>> Here's an example:
>>
>> http://www.webbytedd.com/bb/tedd/index.php
>>
>> Of course, the smart ones on this list will figure it out pretty quickly.
>>
>
> I guess I'm not smart. =( If it's fairly obvious, then I'm not seeing it...
>
> ~Phil
Me neither. I'm guessing: either it's using a file to transfer vars (cookie
or server-written file), or... I don't know :P
Regards,
Thiago
>
>
>
> Cheers,
>>
>> tedd
>>
>> PS: Daniel, please don't offer hints to show how easy this is. I would
>> like to see what others say.
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Thiago Henrique Pojda