//////JQUERY $(".buttonClass").click(function(event) { event.preventDefault(); $.post(url, data, function(response) { // hide the clicked button $(this).hide(); // insert content from the called php function after the button $(this).after(response); }); }); ///// FORM