Form is resubmitted when the back button is pressed
问题 I have a problem with my contact form that I have made using HTML and PHP. When the user clicks submit it redirects to another page where the user gets the message, "Your message has been sent". It then automatically redirects to the home page. But when the user clicks the back button, the message appears again and the form is resubmitted. Consequently I get two identical messages sent to my email! How can I fix this? 回答1: Take a look at Preventing form resubmission and Prevent Back button