-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathgetdoctor.php
More file actions
28 lines (28 loc) · 737 Bytes
/
getdoctor.php
File metadata and controls
28 lines (28 loc) · 737 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<script type="text/javascript"></script>
<body>
<?php
require_once("DBconnect.php");
$query ="SELECT distinct DID FROM doctor_available WHERE CID = '" . $_POST["CID"] . "'";
$results = $conn->query($query);
?>
<option value="">Select Doctor</option>
<?php
while($rs=$results->fetch_assoc()) {
$query1="Select distinct name from doctor where DID=".$rs["DID"];
$result1=$conn->query($query1);
while($rs1=$result1->fetch_assoc())
{
?>
<option value="<?php echo $rs["DID"]; ?>"><?php echo $rs["DID"].":".$rs1["name"]; ?></option>
<?php
}
}
?>
</body>
</html>