-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteproduct.php
More file actions
34 lines (28 loc) · 908 Bytes
/
deleteproduct.php
File metadata and controls
34 lines (28 loc) · 908 Bytes
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
<html>
<head>
<title>Pixel Bay</title>
</head>
<link rel="shortcut icon" type="image/png" href="assets/img/fav.png">
<link rel="stylesheet" type = "text/css" href ="assets/css/manager_registered_success.css">
<link rel="stylesheet" type = "text/css" href ="assets/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<body>
<?php
require 'connection.php';
$conn = Connect();
$pro_id = $_GET["id"];
$query = "DELETE FROM custpro WHERE pro_id='$pro_id'";
$success = $conn->query($query);
$query = "DELETE FROM products WHERE pro_id='$pro_id'";
$success = $conn->query($query);
if (!$success){
die("Couldnt delete data: ".$conn->error);
}
else {
header("location: index.php"); //Redirecting
}
$conn->close();
?>
</body>
</html>