This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
confirmation.php
76 lines (48 loc) · 1.74 KB
/
confirmation.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
session_start();
if(!isset($_SESSION['loggedin'])){
header('Location: index.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<?php
include('header.php')
?>
<body class="form-v8 loggedin" id="fade">
<div id="loader">
<div class="loader"><div></div><div></div><div></div><div></div></div>
</div>
<?php include('navbar.php'); ?>
<div class="content">
<div>
<h2>Confirmation</h2>
<p>
<?php
include('serverconnect.php');
$equipmentName = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$userID = $_SESSION['id'];
echo $userID;
$equipmentID = $_POST['equipment'];
// echo $equipmentID;
$checkoutRequestsID = $_POST['checkoutRequestsID'];
echo $checkoutRequestsID;
$query = mysqli_query($db,"select * from EqManage.equipment where id = '$equipmentID'");
while ($row = mysqli_fetch_array($query)){
$equipmentName = $row['equipment'];
}
// echo $equipmentName;
echo '<h3 style="text-align: center"><b>Do you really want to return: </b></h3>';
echo "<h1 style='text-align: center'><b>$equipmentName</b></h1>";
}
?>
<form method="post" action="return-process.php">
<input type="hidden" name="userid" value="<?php echo $userID ?>">
<input type="hidden" name="equipment" value="<?php echo $equipmentID ?>">
<input type="hidden" name="checkoutRequestsID" value="<?php echo $checkoutRequestsID ?>">
<input name="confirm" type="submit" value="Confirm" style="width: 100%; margin-top: 20px">
</form>
</div>
</div>