-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewpatientappointments.php
76 lines (74 loc) · 1.93 KB
/
viewpatientappointments.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
76
<html>
<head>
<link rel="stylesheet" href="main.css">
<style>
table{
width: 85%;
border-collapse: collapse;
border: 4px solid black;
padding: 5px;
font-size: 25px;
}
th{
border: 4px solid black;
background-color: #4CAF50;
color: white;
text-align: left;
}
tr,td{
border: 4px solid black;
background-color: white;
color: black;
}
</style>
<script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>
</head><?php include "dbconfig.php"; ?>
<body style="background-image:url(images/cancelback.jpg)">
<div class="header">
<ul>
<li style="float:left;border-right:none"><strong><?php session_start(); echo $_SESSION['user']; ?></strong></li>
<li><a href="ulogin.php">Home</a></li>
</ul>
</div>
<center>
<?php
$username=$_SESSION['username'];
$sql1 = "Select * from book 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>
<footer>
<h4 align="center">© Copyright 2018, Muhammad Bilal Sadiq<h4>
</footer>
</html>