-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchbystore.php~
57 lines (49 loc) · 1.77 KB
/
searchbystore.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
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="js/jquery.tablesorter.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#mytable").tablesorter();
});
</script>
</script>
</head>
<body>
<table class="tablesorter" border=5 color="black"id="mytable" >
<tr><th>ID</th><th>Name</th><th>Address</th><th>Medicine</th><th>Quantity</th>
<?php
$text2 = $_POST['text2'];
session_start();
include("connect.php");
echo "hello";
$sql = "SELECT * FROM Chemist,Chemist_Has WHERE Chemist_Name='".$text2."' and Chemist = Chemist_ID";
$result = $db->query($sql);
echo "<br>";
if ($result->num_rows > 0) {
// echo "<table border=5 color=black class=tablesorter id=table";
//echo "<tr><th>ID</th><th>Name</th><th>Address</th><th>Medicine</th><th>Quantity</th>";
while($row = $result->fetch_assoc()) {
echo "<font size = '5'><tr><td>".$row["Chemist"]."</td><br>";
echo "<td>".$row["Chemist_Name"]."</td>";
echo "<td>".$row["Address"]."</td>";
echo "<td>".$row["Medicine_name"]."</td><br>";
echo "<td>".$row["Quantity"]."</td></tr><br></font></center>";
}
echo "</table>";
} else {
echo "<center><font size = 6px>Data not found</font></center>";
}
$db->close();
?>
<select id="dd">
<option value="0">ID</option>
<option value="1">Name</option>
<option value="2">Address</option>
<option value="3">Medicine</option>
<option value="4">Quantity</option>
</select>
<br/><br/>
<input type="button" id="btnSort" Value="Sort Dropdown By " />
</body>
</html>