Courses.php: better spacing and better variable name (fname -> faculty)
parent
33e454e3da
commit
a8b235052f
16
Courses.php
16
Courses.php
|
@ -610,14 +610,13 @@ include 'Header.php';
|
||||||
<div class='col-md-5'>
|
<div class='col-md-5'>
|
||||||
List courses by faculty
|
List courses by faculty
|
||||||
<select name='faculty' class='form-control'>";
|
<select name='faculty' class='form-control'>";
|
||||||
$result = mysqli_query($con,"SELECT DISTINCT(Faculty) as Faculty FROM `courses_table`");
|
$result = mysqli_query($con, "SELECT DISTINCT(Faculty) AS Faculty FROM courses_table");
|
||||||
if(mysqli_num_rows($result)==0){
|
if (mysqli_num_rows($result) > 0){
|
||||||
} else {
|
|
||||||
echo" <option value=''>Search by faculty</option>";
|
|
||||||
while($row = mysqli_fetch_assoc($result)) {
|
while($row = mysqli_fetch_assoc($result)) {
|
||||||
$fname=$row['Faculty'];
|
$faculty = $row['Faculty'];
|
||||||
echo " <option value='$fname'> $fname </option>";
|
echo " <option value='$faculty'> $faculty </option>";
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo " </select>
|
echo " </select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -629,10 +628,9 @@ include 'Header.php';
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div></div>";
|
</div></div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue