Ming Qian wrote:
Dear Perl Pros:
I have a simple perl cgi web page. It contains a simple form.
Submitting it(with some POST Data) will redirect itself, insert the
data into a database 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 to resend the data.
What do I need to do code-wise so that when the browser is refreshed,
the page is reloaded without this message being displayed(It is best
to let the page go back to the initial status).
Maybe this is one I could offer some help with. I can think of two
solutions, don't know if either conform to best practices. One is to
have the initial perl script load or write another blank page that has a
meta-refresh tag set to 1 second duration, to redirect the user back to
the initial perl script. Or, if you have access to the server settings,
set a page redirect back to the initial script and again send the user
to that bogus page, so that the server forces the user back to the script.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/