Right now I redirect to index page after I delete a record. However I am looking to make it so that I can delete a record without redirecting the page. I know this can be accomplised using Ajax. I have spent countless hours before trying to make it work, but it did not work.
So here is a basic setup I created. Can you please update it with ajax code so that I can see how it's done properly?
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home Page</title>
</head>
<body>
<div class="record" >
<a href="record.php?id=<?php echo $record_id ?>"><?php echo $record_name; ?></a>
<div class="delete-record">
<a href="delete.php">Delete Record</a>
</div>
</div>
</body>
</html>