-
Notifications
You must be signed in to change notification settings - Fork 0
/
products.php
110 lines (92 loc) · 4.29 KB
/
products.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Products</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/smstyle.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid mb-4">
<div class="row">
<div class="col-12"><h1>PHARMACY MANAGEMENT SYSTEM</h1></div>
</div>
<!-- name -->
<div class="container">
<div class="col-sm ">
<form action ="search.php" method="POST" class="my-lg-0 col-12">
<input class="form-control badge-pill col-6 float-left mr-2" name="search" placeholder="Search" aria-label="Search">
<button class="btn my-2 my-sm-0 float-right" type="submit">Search</button>
</form>
</div>
</div>
<!-- search portion -->
<div class="navbar mb-4">
<ul class="nav text-center justify-content-center">
<li><a href="index.php"action ="search.php" method="POST">Home</a></li>
<li><a href="products.php">Drugs</a>
<ul>
<li><a href=#>Disease</a></li>
<li><a href=#>Generics</a></li>
</ul>
</li>
<li><a href="pharmacy.php">Pharmacies</a></li>
<li><a href="pharmacom.php">Pharamaceuticals</a></li>
</ul>
</div>
<!-- -->
<div class="container">
<div class="row">
<?php
include('db.php');
// if($con){
// echo "done";
// }else{
// echo "not con";
// }
$query = " SELECT `medID`, `name`, `strength`, `generic_name`, `pharmainfo`, `pharma_company`, `price`, `img` FROM `medicine` order by medId asc";
$result = mysqli_query($con, $query);
$rows = mysqli_num_rows($result);
if($rows > 0){
while($med = mysqli_fetch_array($result)){
?>
<div class= "col-lg-3 col-md-3 col-sm-12 mb-2">
<div class="card mb-3" style="width: 15rem;">
<img class="medimg mb-2"src ="<?php echo $med['img']; ?>" alt="">
<div class="card-body c text-center">
<h4 class="card-title"><?php echo $med['name'] ; ?></h4>
<h6 class="card-text"> <?php echo $med['pharma_company'] ;?></h6>
<h4> <img src ="tk.png" alt="" height="15px" width="15px" > <?php echo $med['price'] ;?></h4>
<!-- <h6>(<?php echo $med['pharmainfo'];?>)</h6> -->
<form action ="med.php" method="POST">
<input type="hidden" name="medName" value= "<?php echo $med['name']; ?>">
<input type="submit" value="View details">
</form>
<!-- <a href="med.php"><button class="btn btn-dark" type="submit">View details</button></a> -->
</div>
</div>
</div>
<?php
}
}
?>
</div>
</div>
<!-- product display end -->
<footer class=" container-fluid color-light">
<hr>
<div class="footer">
footer
</div>
</footer>
</body>
</html>