want to delete record from database by calling php function or in javascript

want to delete record from database by calling php function or in javascript

swal({
title: “Are you sure?”,
text: “You will not be able to recover this product parts!”,
type: “warning”,
showCancelButton: true,
confirmButtonColor: “#DD6B55”,
confirmButtonText: “Yes, delete it!”,
cancelButtonText: “No, cancel please!”,
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
// code for deletion (php function)
swal(“Deleted!”, “product parts has been deleted.”, “success”);
} else {
// code to revert back to old value (php function)
swal(“Cancelled”, “product parts are not deleted”, “error”);
}
});

How to avoid the default warning message during deleting records from multiple records display?

You can see a sample of a grid run script in samples on sc website. That does this trick