Re: Resending POST Variables
| From: | Tom Woody | Date: | Wed, 28 May 2003 16:46:24 +0000 |
| Subject: | Re: Resending POST Variables | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149285@lists.php.net to get a copy of this message | ||
On Wed, 2003-05-28 at 11:38, Shaun wrote:
> ok,
>
> basically this is so I can implement page numbering on my search results,
> the user submits the form and I want to be able to send the form results
> back to the same page when the user clicks 'next' or 'previous'.
>
I do the very same thing as you, but I link to the same page. I have my
search results show a count, and the user can choose a specific page, or
they can use next and previous links. But I never leave the first page.
And my page uses both GET and POST...Also its an internally accessed
page only so I don't have as many security aspect to deal with.
I check from the presence of on of the $_POST variables that will always
be present. If its there, I perform actions assuming a $_POST
occurred. Otherwise I assume $_GET, as there will never be a case where
both a POST and a GET happen at the same time. The search results are
done as links to the $_SERVER['PHP_SELF'] with get variables appended on
the URL. This sets the page I'm looking at, then I use the offset and
limit on the mysql query to build the next page. If you are interested
I can send more specific code example...
--
Tom
In a world without boundaries why
do we need Gates and Windows?