-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_leaves.php
More file actions
47 lines (41 loc) · 1.59 KB
/
list_leaves.php
File metadata and controls
47 lines (41 loc) · 1.59 KB
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
<?php
include("check.php");
include("db.php");
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>List Leaves</title>
</head>
<body>
<?php
$sql = "SELECT start_time, end_time, period, reason, start_time_when, end_time_when, leave_why FROM leaves WHERE name='$user_name'";
$result = mysqli_query($db, $sql);
echo "total:" . mysqli_num_rows($result) . "rows <br>";
echo "<table border='4' cellspacing='0'>";
echo "<tr>";
echo "<th>Leave Why</th>";
echo "<th>Start Time</th>";
echo "<th>End Time</th>";
echo "<th>Period</th>";
echo "<th>Reason</th>";
echo "<th>Start Time When</th>";
echo "<th>End Time When</th>";
echo "</tr>";
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['leave_why'] . "</td>";
echo "<td>" . $row['start_time'] ."</td>";
echo "<td>" . $row['end_time'] . "</td>";
echo "<td>" . $row['period'] . "</td>";
echo "<td>" . $row['reason'] . "</td>";
echo "<td>" . $row['start_time_when'] . "</td>";
echo "<td>" . $row['end_time_when'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($db);
?>
</body>
</html>