|
Posted by David Haynes on 02/14/06 20:02
tmax wrote:
> PHP Pros:
>
> I have a simple html form that submits data to a php script, which
> processes it, and then redisplays the same page, but with a "thank you"
> message in place of the html form. This is all working fine. However,
> when refresh the browser, I get the following message displayed:
>
> "The page you are trying to view contains POSTDATA. If you resend the
> data, any action the form carried out (such as as search or online
> purchse) will be repeated. To resend the data, click OK. Otherwise,
> click Cancel."
>
> Obviously I don't want my users to resend the data to me.
>
> What do I need to do code-wise so that when the browser is refreshed,
> the page is reloaded without this message being displayed.
>
> Thanks in advance.
Don't redirect to the form; redirect to a summary page without the form
or make your form page sensitive to whether the $_POST data is available
and do not have it emit a <form> if the $_POST data is available.
I prefer the first method over the second.
-david-
Navigation:
[Reply to this message]
|