-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewmedicine.php
68 lines (63 loc) · 1.52 KB
/
viewmedicine.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
<?php
include("header.php");
include("dbconnection.php");
if(isset($_GET[delid]))
{
$sql ="DELETE FROM medicine WHERE medicineid='$_GET[delid]'";
$qsql=mysqli_query($con,$sql);
if(mysqli_affected_rows($con) == 1)
{
echo "<script>alert('Medicine redcord deleted successfully..');</script>";
}
}
?>
<div class="wrapper col2">
<div id="breadcrumb">
<ul>
<li class="first">View medicine list</li></ul>
</div>
</div>
<div class="wrapper col4">
<div id="container">
<section class="container">
<h2>Search medicine - <input type="search" class="light-table-filter" data-table="order-table" placeholder="Filtrer" /></h2>
<table class="order-table">
<thead>
<tr>
<th>Medicine name</th>
<th>Medicine cost</th>
<th>description</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$sql ="SELECT * FROM medicine";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
echo "<tr>
<td> $rs[medicinename]</td>
<td> $rs[medicinecost]</td>
<td> $rs[description]</td>
<td> $rs[status]</td>
<td>
<a href='medicine.php?editid=$rs[medicineid]'>Edit</a> | <a href='viewmedicine.php?delid=$rs[medicineid]'>Delete</a> </td>
</tr>";
}
?>
</tbody>
</table>
</section>
<h1> </h1>
<p> </p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php
include("footer.php");
?>