...

View Full Version : Prevent from Submitting Again



treeleaf20
12-08-2010, 04:41 PM
All,
I am submitting a form to a page and when I refresh it I want to now allow it to to submit again. I know I get a pop up box and I can control the query part by setting a variable in getting the post variables but just curious if PHP had an easier way to do this to find it a page was submitted.

Thanks in advance.

CloudWriter
12-08-2010, 05:14 PM
if you are using if php ($_POST) use header to redirect you back to your page - just guessing without seing the code


header("Location: ./yourpage.php");

?php if ($_POST) {echo "Form was entered correctly";} ?>

mlseim
12-08-2010, 10:23 PM
Set a SESSION variable ...

and check it each time before you display the form.

Google: PHP SESSION TUTORIAL



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum