-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteProductProcess.php
More file actions
22 lines (18 loc) · 1018 Bytes
/
Copy pathdeleteProductProcess.php
File metadata and controls
22 lines (18 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
include "connection.php";
$product_id = $_GET['product_id'];
$query = "DELETE FROM bookings WHERE product_id = $product_id;";
mysqli_query($connect, $query);
if (mysqli_query($connect, $query)) {
$query = "DELETE FROM products WHERE product_id = $product_id;";
if (mysqli_query($connect, $query)) {
echo "<script>alert('Alhamdulillah udah bisa'); window.location.href='homeVendor.php'</script>";
} else {
//echo mysqli_error($connect);
echo "<script>alert('Maaf gabisa nambahin soalnya nganu<br>" . mysqli_error($connect) . "'); window.location.href='homeVendor.php'</script>";
}
} else {
//echo mysqli_error($connect);
echo "<script>alert('Maaf gabisa nambahin soalnya nganu<br>" . mysqli_error($connect) . "'); window.location.href='homeVendor.php'</script>";
}
?>