I have a PHP page with tables and buttons of every offers I get and using that button I will accept the offers I get where my back-end PHP file will update queries and send email to the accepted offer owners (email id retrieved from the row button). However, this takes some time and I want to display a loading screen to notify users that the page is being processed & prevent button spam. I have seen some examples that recommend AJAX, but I am not familiar with it. Is there any other way where this can be solved?
echo "<td><button><a href='approvedproposal.php?requestid=".$rows['requestid']."'>Accept</a></button></td>";
// send email codes // update table queries