Skip to content
Advertisement

How to Prevent Users from Submitting a Form Twice

<input type="submit" name="btnADD" id="btnADD" value="ADD"/>

when user click add button twice, from get submitted twice with same data into table. So Please help me to restrict user to submit from twice.

Advertisement

Answer

try out this code..

<input type="submit" name="btnADD" id="btnADD" value="ADD" onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();" />
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement