-
Notifications
You must be signed in to change notification settings - Fork 3
/
delete.php
71 lines (68 loc) · 1.68 KB
/
delete.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
<?php
$conn=mysqli_connect('localhost','pjuser','12345678','awscop');
settype($_POST['id'], 'integer');
$filtered = array(
'id' => mysqli_real_escape_string($conn, $_POST['id'])
);
$sql = "
DELETE FROM employee_salary WHERE id = '{$filtered['id']}'
";
$result = mysqli_multi_query($conn, $sql);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>AWSCOP</title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div id="page">
<div id="header">
<div id="logo">
<a href="index.php"><img src="images/logo.png" alt="LOGO"></a>
</div><!--logo-->
<ul id="navigation">
<li><a href="create.php">Registration</a></li>
<li><a href="print.php">View/Modify</a></li>
</ul><!--navigation-->
</div><!--header-->
<div id="contents">
<?php
if($result === false) {
echo 'An error occurred during the deletion process. Please contact your administrator.';
echo error_log(mysqli_error($conn));
} else {
header('Location: print.php');
}
?>
</div><!--contents-->
<div id="footer">
<div id="links">
<li>
<h4>When Something Wrong</h4>
<ul>
<li>TEL : 0212345678</li>
<li>E-MAIL : aws123@gmail.com</li>
</ul>
</li>
<li>
<h4>Social Links</h4>
<ul id="connect">
<li>
<a href="https://twitter.com/" target="_blank">Twitter</a>
</li>
<li>
<a href="https://www.facebook.com/" target="_blank">Facebook</a>
</li>
</ul><!--connect-->
</li>
</div><!--links-->
<p class="footnote">
© 2020. Hong Su Min all rights reserved.
</p>
</div><!--footer-->
</div><!--page-->
</body>
</html>