-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrinksdelete.php
More file actions
42 lines (39 loc) · 1.18 KB
/
drinksdelete.php
File metadata and controls
42 lines (39 loc) · 1.18 KB
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
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/bikesdelete.css">
<title>Delete a Drinks Record</title>
</head>
<body>
<nav class="navbar background">
<div class="logo">
<h2>spCvl_inventory</h2>
</div>
<ul class="nav-list">
<li><a href="admin.html">Back</a></li>
</ul>
</nav>
<section class="firstsection">
<div class="box-main" style="width:70%;height:70%;">
<div class="firstHalf">
<h1 style="border-radius:10px;font-size:30px;text-align:center;">Enter Product ID</h1>
<br><br>
<form method="post">
<input type="text" name="id" placeholder="Product ID">
<button name="submit" style="border-radius:10px;font-size:20px;text-align:center;">Delete</button>
</form>
<?php
if (isset($_POST['submit'])) {
$con = mysqli_connect("localhost", "root", "", "inventory_control_system");
$id = $_POST['id'];
if ($id) {
mysqli_query($con, "DELETE FROM drinks WHERE id='$id'");
echo "<script>alert('Delete successful');</script>";
}
}
?>
</div>
</div>
</section>
</body>
</html>