How to use same php function for different button clicks – Jquery ajax
Here is a simple PHP form with a button.. <form method="POST"> <div class="mb-3"> <button type='button' id ="btnnew1" class="btn btn-info" >submit</button> <p></p> </div> </form> Here is the Jquery functions which executes a PHP file. $(document).ready(function(){ $("#btnnew1").click(function(e){ if(!confirm('Are you sure?')){ e.preventDefault(); return…