Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear form data when user clicks back

Tags:

html

php

How do I clear the contact form data when the user clicks back on the browser to prevent spammers submitting the form multiple times by clicking back, submit over and over again?

like image 421
Julian Avatar asked Dec 04 '22 07:12

Julian


1 Answers

If you are using HTML5 then you can set your FORM's Autocomplete function OFF.

<form action="youractionpage" method="post" autocomplete="off">
</form>
like image 91
yaqoob Avatar answered Dec 17 '22 00:12

yaqoob