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.
With only PHP you can easily delete records but require to submit the page or send value by URL and according it delete record.
This works and removes the record but it reloads the page every time.
You can do this with jQuery AJAX where you need to pass the record id from AJAX which need to delete.
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 remove record and also remove HTML table row with fadeOut() effect.