-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprescriptiondetail.php
46 lines (44 loc) · 1.33 KB
/
prescriptiondetail.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
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>Doctor</th>
<th>Patient</th>
<th>Prescription Date</th>
<th>View</th>
</tr>
<?php
$sql ="SELECT * FROM prescription WHERE patientid='$_GET[patientid]' AND appointmentid='$_GET[appointmentid]'";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
$sqlpatient = "SELECT * FROM patient WHERE patientid='$rs[patientid]'";
$qsqlpatient = mysqli_query($con,$sqlpatient);
$rspatient = mysqli_fetch_array($qsqlpatient);
$sqldoctor = "SELECT * FROM doctor WHERE doctorid='$rs[doctorid]'";
$qsqldoctor = mysqli_query($con,$sqldoctor);
$rsdoctor = mysqli_fetch_array($qsqldoctor);
echo "<tr>
<td> $rsdoctor[doctorname]</td>
<td> $rspatient[patientname]</td>
<td> $rs[prescriptiondate]</td>
<td><a href='prescriptionrecord.php?prescriptionid=$rs[0]&patientid=$rs[patientid]' >View</td>
</tr>";
}
?>
</tbody>
</table>
<?php
if(isset($_SESSION[doctorid]))
{
?>
<hr>
<table>
<tr>
<td>
<div align="center"><a href="prescription.php?patientid=<?php echo $_GET[patientid]; ?>&appid=<?php echo $rsappointment[appointmentid]; ?>">Add Prescription records</a></div>
</td>
</tr>
</table>
<?php
}
?>