-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelsup.php
More file actions
25 lines (19 loc) · 1.03 KB
/
delsup.php
File metadata and controls
25 lines (19 loc) · 1.03 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
<?php
$db = mysqli_connect("localhost","root","","p1");
if(!$db)
{
die("Connection failed: " . mysqli_connect_error());
}
$nic = $_GET['nic']; // get id through query string
$del = mysqli_query($db,"delete from supplier where nic ='$nic'"); // delete query
if($del)
{
mysqli_close($db); // Close connection
// redirects to all records page
exit;
}
else
{
echo "Error deleting record"; // display error message if not delete
}
?>