-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
42 lines (32 loc) · 1.16 KB
/
data.php
File metadata and controls
42 lines (32 loc) · 1.16 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
<?php
require_once 'dbh.php';
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `request` WHERE `Status` LIKE 'Pending' ORDER BY `id` DESC";
$result = $conn->query($sql);
?>
<tr>
<th scope="col">Name</th>
<th scope="col">Position</th>
<th scope="col">Destination</th>
<th scope="col">Type of Request</th>
<th scope="col">Status</th>
<th scope="col">Action</th>
</tr>
<?php
while($row = mysqli_fetch_assoc($result))
{
?>
<td><?php echo $row["name"]; ?></td>
<td><?php echo $row["position"]; ?></td>
<td><?php echo $row["destination"]; ?></td>
<td><?php echo $row["typeofbusiness"]; ?></td>
<td><?php echo $row["Status"]; ?></td>
<td><a href="view.php?id=<?= $row['id']; ?>" class="btn btn-info btn-sm">View</a></td>
</tr>
<?php
}
$conn->close();
?>