Reply to Re: Clearing POST DATA for Browser Refresh

Your name:

Reply:


Posted by Jasen Betts on 02/15/06 10:03

On 2006-02-14, tmax <tmax@comcast.net> 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.

I think this will work.


when they post the form issue a redirect


(use a fixed pitch font or the following won't make much sense)

user posts automatic user navigates
form -----> redirect ------> thankyou --------> further
page page

when the user goes back from the "further" page they'll hit the
thankyou page (which was got by the redirect so no data to post)
(back again gets them to the form.)


Bye.
Jasen

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация