-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete.php
37 lines (33 loc) · 1.06 KB
/
delete.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
<?php
include('config.php');
$id = $_GET['id'];
$sql = "DELETE FROM product WHERE id = '$id'";
$run = mysqli_query($conn,$sql);
if(isset($run)){
?>
<body onload="toast()">
<script>
function toast(){
Toastify({
text: "Deleted from products",
duration: 1000,
newWindow: true,
close: true,
gravity: "bottom",
position: "center",
stopOnFocus: true,
style: {
background: "#F76400",
},
onClick: function(){
// window.location = 'cart.php';
}
}).showToast();
setTimeout(function(){window.location = 'product.php'},1500)
}
</script>
<?php }
?>
</body>