Re: Keeping POST values when paging
| From: | Eric Butera | Date: | Tue, 08 Jul 2008 15:57:17 +0000 |
| Subject: | Re: Keeping POST values when paging | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276439@lists.php.net to get a copy of this message | ||
On Tue, Jul 8, 2008 at 11:33 AM, Robert Cummings <robert@interjinn.com> wrote:
> On Tue, 2008-07-08 at 16:18 +0100, Mayer, Jonathan wrote:
>> Yup, some good work there Tedd!
>>
>> 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.
>
> Just a comment... the submit button/session technique sucks with respect
> to passing along links to people. I would suggest scrapping that
> approach and going with a GET approach (where the navigational
> information is present in the URL). I know my clients almost always want
> to be able to paste a URL into an email and have the recipient go
> directly to whatever they are viewing. Maybe that's not an issue for you
> though... yet ;)
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
That isn't practical if your form has 50 fields though.