It is safe to display confirmation alert before deleting a record from MySQL database table.
If the user has accidentally clicked the delete button on the wrong record then it has a choice whether to delete or cancel it.
Confirm box can easily add using confirm() method.
But in this tutorial, I am using Bootstrap Bootbox.js library to display confirm box.
With jQuery AJAX delete a record from the MySQL database with PHP on confirmation.