Merge pull request 'Fixed bug196 - Bizarre options on "list courses by faculty" dropdown list' (#46) from Bug196-Ward into master
Reviewed-on: http://121.4.94.30:3000/mrlan/LRR/pulls/46Bug457-YAAQOB
commit
6831fdcd0f
10
Courses.php
10
Courses.php
|
@ -689,11 +689,13 @@ List courses by faculty
|
|||
|
||||
<select name='faculty' class='form-control'>";
|
||||
$result = mysqli_query($con,"SELECT DISTINCT(Faculty) as Faculty FROM `courses_table`");
|
||||
if(mysqli_num_rows($result)==0)
|
||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
||||
$fname=$row['Faculty'];
|
||||
if(mysqli_num_rows($result)==0){
|
||||
|
||||
echo "<option value=''> Search by faculty </option> <option value='$fname'> $fname </option>";
|
||||
} else {
|
||||
echo"<option value=''> Search by faculty </option>";
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$fname=$row['Faculty'];
|
||||
echo " <option value='$fname'> $fname </option>";
|
||||
}}
|
||||
|
||||
echo "</select></div></div>
|
||||
|
|
Loading…
Reference in New Issue