-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete_account.php
72 lines (59 loc) · 1.55 KB
/
delete_account.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
63
64
65
66
67
68
69
70
71
72
<?php
include('session.php');
if(isset($_POST['deletebutton']))
{
$id = $_POST['employeeID'];
$sql = "DELETE FROM Employee WHERE EmployeeID = " . $id;
$result = mysqli_query($db,$sql);
if ($result)
{
echo "Employee deleted successfully.";
}
else
{
echo "Error deleting record.";
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Employer Dashboard </title>
<link rel = "stylesheet" type = "text/css" href = "stylesheet.css">
</head>
<body>
<div id="page">
<header id="header">
<div id="logo">
<h1><a href="employer_dash.php">TAAS<span>IT</span></a></h1>
</div>
<div id="top-nav">
<ul>
<li><a href="employer_dash.php">Home</a></li>
<li><a href="logout.php">Logout</a></li>
<li><a href="#">Help</a></li>
</ul>
</div>
<div class="clr"></div>
</header>
<div id="feature">
<h1>Delete Account</h1>
</div>
<div id = "content">
<div class="deleteAcc">
<br>
<form method="post" action=" <?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">
Enter Employee ID to Delete: <input type="text" name="employeeID" required>
<br><br>
<input type="submit" name = "deletebutton" value="Submit">
</form>
</div>
<div class="clr"></div>
</div>
<footer id="footer">
<p>© Copyright <a href="#">Your Site</a> | <a href="#">Terms of Use</a> | <a href="#">Privacy Policy</a></p>
<div class="clr"></div>
</footer>
</div>
</body>
</html>