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”);
}
});