-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow.php
63 lines (63 loc) · 1.15 KB
/
show.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
<?php
session_start();
if($_SESSION['doctor']=="")
{
header("Location:login.php");
}
else
{
include("Connect.php");
$email=$_SESSION['doctor'];
$query="select * from tbl_doctor where email='$email'";
$res=mysql_query($query);
if($row=mysql_fetch_array($res,MYSQL_BOTH))
{
$did=$row['doc_id'];
}
$query2="select * from tbl_appointment where doc_id='$did'";
$res2=mysql_query($query2);
?>
<?php include("dheader.php"); ?>
<html>
<head>
<title>View Appointment</title>
</head>
<body>
<div class="container">
<h2 class="text-center h1 bg-info mt-2">Appointments</h2>
<table border="5" class="table table-bordered jumbotron table-stripped">
<tr class="warning bg-info">
<th>S.No.</th>
<th>Patient Name</th>
<th>Date</th>
</tr>
<?php
$a=1;
while($row2=mysql_fetch_array($res2,MYSQL_BOTH))
{
?>
<tr>
<td><?php echo $a ?></td>
<?php
$pid=$row2['pat_id'];
$query3="select * from tbl_patient where pat_id='$pid'";
$res3=mysql_query($query3);
if($row3=mysql_fetch_array($res3,MYSQL_BOTH))
{
$pname=$row3['name'];
}
?>
<td><?php echo $pname; ?></td>
<td><?php echo $row2['date']; ?></td>
</tr>
<?php
$a++;
}
?>
</table>
</div>
</body>
</html>
<?php
}
?>