-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuys_s.php
More file actions
41 lines (32 loc) · 976 Bytes
/
buys_s.php
File metadata and controls
41 lines (32 loc) · 976 Bytes
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
<?php
include "config.php";
?>
<form action = "buys_select.php" method = "GET">
<b>Code:</b>
<select name = "code">
<?php
$sql_comment = "SELECT DISTINCT code FROM buys";
$myresult = mysqli_query($db,$sql_comment);
echo "<option value = >" . "any" ."</option>";
while($id_rows = mysqli_fetch_assoc($myresult)){
$code = $id_rows["code"];
echo "<option value = $code>". $code . "</option>";
}
?>
</select>
<br>
<b>Patient Id:</b>
<select name = "pid">
<?php
$sql_comment = "SELECT DISTINCT p_id FROM buys";
$myresult = mysqli_query($db,$sql_comment);
echo "<option value = >" . "any" ."</option>";
while($id_rows = mysqli_fetch_assoc($myresult)){
$pid = $id_rows["p_id"];
echo "<option value = $pid>" . $pid ."</option>";
}
?>
</select>
<br>
<button>SELECT</button>
</form>