There are many things you can do with AJAX to improve the user experience, for example, Add, edit or delete the record and update layout without reloading the page.
Deleting record only using PHP
If you have never used AJAX for deleting before then you either passing the id with $_GET or $_POST methods. Deleting the record when the value is get set.
This works and removes the record but it reloads the page every time.
In this tutorial, I show you How to remove the record from MySQL Table with jQuery AJAX.
What in the demonstration ?
In the demonstration, I am creating the HTML table which shows the list of records with a delete button. When the button gets clicked then removing record and HTML table row with fadeOut() effect.