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? Link to comment https://forums.phpfreaks.com/topic/132128-help-with-webpage-data-re-submitting/ 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> Link to comment https://forums.phpfreaks.com/topic/132128-help-with-webpage-data-re-submitting/#findComment-686639 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.