-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessStatus.php
More file actions
executable file
·54 lines (48 loc) · 2 KB
/
processStatus.php
File metadata and controls
executable file
·54 lines (48 loc) · 2 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
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="styles.css">
<head>
<title>
Covid Database
</title>
<div class="topnav">
<a href="covid.html">Home</a>
<a href="about.html">About</a>
<a href="vaccine.html">Record a Vaccination</a>
<a href="location.php">Find a Vaccination Location</a>
<a class="active" href="status.php">Search Vaccination Status</a>
<a href="employees.php">Show Employees</a>
</div>
</head>
<body>
<?php
include 'connectDB.php';
echo "<br>";
$OHIPNum = $_POST["OHIPNum"];
$query = "select * from Patient where PatientOHIP = '".$OHIPNum."'";
$patient = $connection->query($query)->fetch();
echo "<h1>Showing Vaccinations for ".$patient["PatientFirstName"]." ".$patient["PatientMiddleName"]." ".$patient["PatientLastName"].", OHIP # ".$patient["PatientOHIP"]."</h1>";
echo "<table class=\"center\" style=\"width:80%\">
<tr>
<th>Vaccination Date</th>
<th>Vaccination Time</th>
<th>Lot ID</th>
<th>Vaccination Type</th>
</tr>";
$query = "select VaxDate, VaxTime, VaxLotID from Vaccination where PatientOHIP = '".$OHIPNum."'";
$vaccinations = $connection->query($query);
while($row = $vaccinations->fetch())
{
$query = "select CompanyName from VaccineLot where VaxLotID = '".$row["VaxLotID"]."'";
$vaxType = $connection->query($query)->fetch();
echo "<tr>";
echo "<td>".$row["VaxDate"]."</td>";
echo "<td>".$row["VaxTime"]."</td>";
echo "<td>".$row["VaxLotID"]."</td>";
echo "<td>".$vaxType["CompanyName"]."</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>