PHP Disable Submit Button After Click Example

May 2, 2020 | Category : JQuery PHP

Now, let's see tutorial of disable button after click php laravel. This article goes in detailed on how to disable submit button after one click in jquery. i explained simply about php jquery submit button disabled after click. i explained simply step by step disable submit button after click php.

Sometime, we have to prevent too many clicks on submit button. if you are working on register form with php then it might be take time to submit form because of long processes of submit page. But if user have server issue or Internet issue etc then he will just click again and again. So may it can create problem form us. so basically you must prevent it by using disabled submit button after one click using jquery.

Here bellow simple example will help you to resolved your problem by using bellow example. You can see full example so it can help you in your php project.


<!DOCTYPE html>



<title>How to Disable Submit Button After Form Submission in PHP? -</title>

<script type="text/javascript" src=""></script>



<form action="/post.php" method="POST" id="my-form">

<input type="text" name="name">

<input type="text" name="email">

<button type="submit" id="btn-submit">Submit</button>


<script type="text/javascript">

$(document).ready(function () {

$("#my-form").submit(function (e) {

$("#btn-submit").attr("disabled", true);

return true;






I hope it can help you...