sazzie Posted November 10, 2008 Share Posted November 10, 2008 Hi guys, can anyone please advice me how I can stop data from a webpage form submitting each time I refresh the webpage? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted November 10, 2008 Share Posted November 10, 2008 after the post, do a header() redirect...my pages usually look like this: <?php if($_SERVER['REQUEST_METHOD'] == 'POST'){ //Process form here //Send the page back to itself, without the POST header('Location: '.$_SERVER['PHP_SELF']); exit; } ?> <html> <body> <form action="" method="POST"> FORM STUFF HERE </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.