-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest_denied.php
42 lines (41 loc) · 1.07 KB
/
request_denied.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
<?php include ('session.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Request Denied</title>
<link rel="stylesheet" href="styling.css?v=<?php echo time(); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script type="text/javascript">
function goBack() {
window.history.back();
}
</script>
</head>
<body>
<?php include 'navigation.php'?>
<div class="response">
<?php
include 'dbconnection.php';
$leave_id = $_GET['leave_id'];
$query = "update leave_requests set status = 3
where leave_request_id = '$leave_id'";
if($result = $mysqli -> query($query)) {
echo 'Operation successful';
}
else {
echo 'An error occurred';
}
//Close database connection
$mysqli->close();
?>
<br>
<div class="link">
<button onClick="goBack();">Go Back</button>
</div>
</div>
<div class="empty"></div>
<div id="second">
<?php include 'footer.php' ?>
</div>
</body>
<div>