//////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
<form action="intro_confirmation.php" id="create" method="POST">
<td><center><b> <?php echo $row['name']; ?> </b></center></td><input type="hidden" name="name" value="<?php echo $row['name']; ?>" />
<td><b><?php echo $row['contact_no']; ?></b></td><input type="hidden" name="contact_no" value="<?php echo $row['phone']; ?>" />
<td><center><b><?php echo $row['class']; ?> </b></center></td><input type="hidden" name="class" value="<?php echo $row['class']; ?>" />
<td><center><b><?php echo $row['date_of_intro']; ?></b></center></td><input type="hidden" name="date_of_intro" value="<?php echo $row['date_of_intro']; ?>" />
<td><center><b><?php echo $row['parents_name']; ?></b></center></td><input type="hidden" name="parents_name" value="<?php echo $row['parents_name']; ?>" />
<td><center><b><?php echo $row['email']; ?></b></center></td><input type="hidden" name="email" value="<?php echo $row['email']; ?>" />
<td><center><b><?php echo $row['notes']; ?></b></center></td><input type="hidden" name="notes" value="<?php echo $row['notes']; ?>" />
<input type="hidden" name="dob" value="<?php echo $row['dob']; ?>" />
<input type="hidden" name="trial_type" value="<?php echo $row['trial_type']; ?>" />
<td>
<button class="buttonClass">Re-Send Confirmation</button></td>
</form>