-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeletePolice.php
62 lines (51 loc) · 1.45 KB
/
DeletePolice.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
include('db_connect.php');
if (isset($_POST['dltc'])) {
$Cno = $_POST['cno'];
// database insert SQL code
$sql = "DELETE FROM `police` WHERE `Poname` = '$Cno'";
$rs = mysqli_query($conn, $sql);
if (!$rs) {
echo mysqli_error($conn);
} else {
header('Location: Police.php');
}
}
mysqli_close($conn);
?>
<!DOCTYPE html>
<html lang="en">
<?php include('header.html'); ?>
<?php include('AddPolice.html'); ?>
<div class="form">
<form method="POST" action="DeletePolice.php">
<div class="contain">
<span id="title">
<h1>Delete Police</h1>
<p>Please fill the details of police to be deleted</p>
</span>
<hr>
<label for="Name"><b>Police Name: </b></label>
<input type="text" placeholder="Enter Police Name" name="cno" id="Name" required>
<br>
<a class=" button-1 btn btn-success btn-lg" href="Police.php" role="button">Go Back</a>
<button class=" button-1 btn btn-danger btn-lg" value="Save" name="dltc">Delete</button>
</div>
</form>
</div>
</body>
</html>