-
Notifications
You must be signed in to change notification settings - Fork 2
/
PatientsAppointment.php
75 lines (74 loc) · 2.28 KB
/
PatientsAppointment.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
74
75
<html>
<head>
<link rel="stylesheet" href="main.css">
<body style="background-image: url(Images/Pic4.jpg);"></body>
<style>
table{
width:80%;
border-collapse:separate;
border: 5px black;
padding: 2px;
font-size: 30px;
font-family: cursive;
}
th{
border: 2px black;
background-color:peru ;
color: white;
text-align: left;
}
tr,td{
border: 2px black;
background-color: whitesmoke;
color:black;
}
</style>
<?php include "DBconnect.php"; ?>
<body style="background-color: whitesmoke;">
<div class="header">
<ul>
<li style="float: left; border-right: none;"> <a href="Home.php" class="logo"> <img src="Images/Pic9.png" width="70px" height="60px"> <strong> WeCare </strong> Online Appointment System </a> </li>
<li> <a href="Home.php"><strong>HOME</strong></a></li>
</ul>
</div>
<center>
<?php
include 'DBconnect.php';
session_start();
$username=$_SESSION['username'];
$sql1 = "Select * from booking where username ='".$username."' order by DOV desc";
$result1=mysqli_query($conn, $sql1);
echo "<table>
<tr>
<th>Appointment-Date</th>
<th>Name</th>
<th>Clinic</th>
<th>Doctor</th>
<th>Status</th>
<th>Booked-On</th>
</tr>";
while($row1 = mysqli_fetch_array($result1))
{
$sql2="SELECT * from doctor where DID=".$row1['DID'];
$result2= mysqli_query($conn,$sql2);
while($row2= mysqli_fetch_array($result2))
{
$sql3="SELECT * from clinic where CID=".$row1['CID'];
$result3= mysqli_query($conn,$sql3);
while($row3= mysqli_fetch_array($result3))
{
echo "<tr>";
echo "<td>" . $row1['DOV'] . "</td>";
echo "<td>" . $row1['Fname'] . "</td>";
echo "<td>" . $row3['name']."-".$row3['town'] . "</td>";
echo "<td>" . $row2['name'] . "</td>";
echo "<td>" . $row1['Status'] . "</td>";
echo "<td>" . $row1['Timestamp'] . "</td>";
echo "</tr>";
}
}
}
?>
</center>
</body>
</html>