Topics: 15 | Posts: 10 | Comments: 12 | Members: 151
If you utilize forms on your website and want to ensure that there are no duplicate entries on a single submission, then you can use this simple code.
<!-- to be placed on the button relative to it href -->
onsubmit="this.disabled='disabled';"
<form method="post" action="/location/to/form-handler.php">
<br /> <input type="text" name="my-text" value="">
<br /> <textarea name="description" cols="50" rows="20"></textarea>
<br /> <button type="submit" onclick="this.disabled='disabled';">Submit</button>
</form>