From bc89e6c214d973fb48375d33e6cfe26ab15c0eb8 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Thu, 7 Sep 2023 19:32:09 +0800 Subject: [PATCH] Courses.php: better code spacing --- Courses.php | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/Courses.php b/Courses.php index db8a856..6c62929 100644 --- a/Courses.php +++ b/Courses.php @@ -412,25 +412,22 @@ include 'Header.php'; INNER JOIN users_table ON users_table.Student_ID=course_students_table.Student_ID WHERE Lecturer_User_ID=$lecturer_id AND course_students_table.Status='Pending'"); - if(mysqli_num_rows($result)==0) - { - + if(mysqli_num_rows($result) == 0) { echo "
No course-joining request so far for your courses
"; - } else { while($row = mysqli_fetch_assoc($result)) { - $id=$row['ID']; + } else { + while ($row = mysqli_fetch_assoc($result)) { + $id = $row['ID']; + $name = $row['Course_Name']; + $code = $row['Course_Code']; + $faculty = $row['Faculty']; + $std_name = $row['Full_Name']; + $academic = $row['Academic_Year']; - $name=$row['Course_Name']; - $code=$row['Course_Code']; - $faculty=$row['Faculty']; - $std_name=$row['Full_Name']; - $academic=$row['Academic_Year']; - - echo "
- $std_name is Requesting to join
[($code) - $name ]     
Accept -    Decline -
"; - - } + echo "
+ $std_name is Requesting to join
[($code) - $name ]     
+ Accept    Decline +
"; + } } ?>