-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc_list.php
144 lines (88 loc) · 3.53 KB
/
doc_list.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php include_once "header.php" ?>
<!DOCTYPE html>
<html>
<head>
<title>Doctor Info</title>
</head>
<body>
<h1>Doctor Information</h1>
<div class="container">
<div class="menu">
<a>
<form action="#" method="post">
<select name="doc_specialty" >
<option value="" style="">Specialists</option>
<option value="cardiology">Cardiology</option>
<option value="dermatology">Dermatology</option>
<option value="endocrinology">Endocrinology</option>
<option value="ent">ENT</option>
<option value="general_physician">General Physician</option>
<option value="urology">Urology</option>
<option value="psychiatry">Psychiatry</option>
<option value="pediatrics">Pediatrics</option>
<option value="oncology">Oncology</option>
</select>
<button type="submit" name="submit" value="submit"> Search </button>
</form>
</a>
</div>
<div class="content">
<?php
//specialty
if (isset($_POST['submit'])) {
$doc_specialty=$_POST['doc_specialty'];
$query = "SELECT * FROM doc_signup WHERE specialty= '$doc_specialty'";
$select_posts = mysqli_query($db,$query);
while ($row = mysqli_fetch_assoc($select_posts)){
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$designation = $row['designation'];
$specialty = $row['specialty'];
$professional_statement = $row['professional_statement'];
$img=$row['profile_img'];
echo "
<div class='inner_content'>
<div><img src='$img' class='imgs'></div>
<div>{$first_name} {$last_name}
<br> {$designation}
<br>{$specialty}
<br>{$professional_statement}
<br><br>
<button type='button' class='btn btn-light'><a href='doc_appointment.php'><b>Request Appointment</b></a></button>
</div>
</div>
";
}
}
else{
$query = "SELECT * FROM doc_signup";
$select_posts = mysqli_query($db,$query);
while ($row = mysqli_fetch_assoc($select_posts)){
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$designation = $row['designation'];
$specialty = $row['specialty'];
$professional_statement = $row['professional_statement'];
$img=$row['profile_img'];
echo "
<div class='inner_content'>
<div><img src='$img' class='imgs'></div>
<div>{$first_name} {$last_name}
<br> {$designation}
<br>{$specialty}
<br>{$professional_statement}
<br><br>
<button type='button' class='btn btn-light'><a href='doc_appointment.php'><b>Request Appointment</b></a></button>
</div>
</div>
";
}
}
?>
</div>
</div>
<br><br><br>
</body>
</html>
<link rel="stylesheet" type="text/css" href="doc_list.css">
<?php include "footer.php" ?>