It is safe to display a confirmation alert before deleting a record from the 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 the Bootstrap Bootbox.js library to display the confirm box.
With jQuery AJAX delete a record from the MySQL database with PHP on the confirmation.