-
Notifications
You must be signed in to change notification settings - Fork 0
/
hosp.php
73 lines (61 loc) · 2.11 KB
/
hosp.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
73
<?php
session_start();
include "pdo/connection.php";
$sql = "SELECT * from hospital";
$result = mysqli_query($conn, $sql);
?>
<!DOCTYPE html>
<html>
<head>
<title>Hospitals</title>
<link rel="stylesheet" href="pdo/style.css">
<?php include 'pdo/headers.php'; ?>
</head>
<body id="view">
<div class="container">
<div class="container h-100" id="login">
<img src="pdo/pic.png" alt="Assam Police Logo"><br>
<p id="login"></p>
<script src="pdo/script.js"></script>
</div>
<h1>List of Covid Treating Hospitals</h1><br>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="thead-dark">
<th>Hospital-ID</th>
<th>Containment Zone-ID</th>
<th>Number of <br>Ambulances</th>
<th>Number of <br>Beds Available</th>
<th>Date of Last Medical Supplies</th>
<th>Expiration Range</th>
<th>Action</th>
</thead>
<?php
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["hsp_id"]; ?> </td>
<td><?php echo $row["cz_id"]; ?> </td>
<td><?php echo $row["no_amb"]; ?></td>
<td><?php echo $row["bed_avail"]; ?></td>
<td><?php echo $row["los"]; ?></td>
<td><?php echo $row["exp_range"]; ?></td>
<td><a href="edithsp.php?hsp_id=<?php echo $row['hsp_id']; ?>"> Edit</a>
</tr>
<?php
}
}
?>
</table>
</div>
<br>
<p><a href="addhsp.php">
<h3>Add Data</h3>
</a><br>
<a href="index.php">
<h3>Done</h3>
</a></p>
</div>
</body>
</html>