-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewprescriptionrecord.php
60 lines (59 loc) · 1.44 KB
/
viewprescriptionrecord.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
<?php
include("header.php");
include("dbconnection.php");
if(isset($_GET['delid']))
{
$sql ="DELETE FROM prescription_records WHERE prescription_record_id='$_GET[delid]'";
$qsql=mysqli_query($con,$sql);
if(mysqli_affected_rows($con) == 1)
{
echo "<script>alert('prescription record deleted successfully..');</script>";
}
}
?>
<div class="wrapper col2">
<div id="breadcrumb">
<ul>
<li class="first">View Prescription Record</li></ul>
</div>
</div>
<div class="wrapper col4">
<div id="container">
<h1>View Prescription record</h1>
<table width="200" border="3">
<tbody>
<tr>
<td>Medicine</td>
<td>Cost</td>
<td>Unit</td>
<td>Dosage</td>
<td>Status</td>
<td>Action</td>
</tr>
<?php
$sql ="SELECT * FROM prescription_records";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
echo "<tr>
<td> $rs[medicine_name]</td>
<td> $rs[cost]</td>
<td> $rs[unit]</td>
<td> $rs[dosage]</td>
<td> $rs[status]</td>
<td> <a href='prescriptionrecord.php?editid=$rs[prescription_record_id]'>Edit</a> | <a href='viewprescriptionrecord.php?delid=$rs[prescription_record_id]'>Delete</a> </td>
</tr>";
}
?>
</tbody>
</table>
<p> </p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php
include("footer.php");
?>