-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_medicine.php
91 lines (88 loc) · 2.65 KB
/
view_medicine.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
include("db_connect.php");
$pres_id=$_GET["pres_id"];
$query=mysqli_query($con,"select * from prescription where pres_id='$pres_id';");
?>
<html>
<head>
<title>View Medicine</title>
</head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;700&display=swap" rel="stylesheet">
<style>
*{
box-sizing: border-box;
font-family: "manrope","sans-serif";
}
body{
background-color: #f2f2f2;
margin: 0;
}
nav{
display: flex;
justify-content: right;
padding: 1% 2%;
background-color: white;
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1);
}
nav > a{
text-decoration: none;
color: black;
padding-left: 2%;
}
table{
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1);
background-color: white;
margin: 5% auto;
border-radius: 5px;
padding: 2%;
width: 50%;
border-collapse: collapse;
border: 1px solid #ddd;
}
table th,
table td {
border: 1px solid #ddd;
padding: 8px;
}
table th {
background-color: #f2f2f2;
text-align: left;
}
table tbody tr:nth-child(even) {
background-color: #f9f9f9;
}
table tbody tr:hover {
background-color: #f2f2f2;
}
</style>
<body>
<nav>
<a href="view_customer.php">Back</a>
<a href="index.php">Logout</a>
</nav>
<table cellspacing="3">
<tr>
<th>Prescription ID</th>
<th>Drug Name</th>
<th>Strength</th>
<th>Dose</th>
<th>quantity</th>
<th>Delete</th>
</tr>
<?php
while($row=mysqli_fetch_array($query)){
echo "<tr>";
echo "<td>".$row["pres_id"]."</td>";
echo "<td>".$row["drug_name"]."</td>";
echo "<td>".$row["strength"]."</td>";
echo "<td>".$row["dose"]."</td>";
echo "<td>".$row["quantity"]."</td>";
echo "<td><a href='delete_medicine.php?pres_id=".$pres_id."&drug_name=".$row["drug_name"]."'>delete</a></td>";
echo "</tr>";
}
?>
</table>
</body>
</html>