I have a simple php form, like this:
<?php
if(isset($_POST['myform']))
// email...
else
// display form
the problem is that if I refresh the page after I submit the form, it gets submitted twice.
How can I prevent this from happening?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should perform a REDIRECT to a page with a message that the data was inserted… and a back button to go to the form again (if you want to)…
To redirect using
PHPuse theheaderfunction: