From 5683013655576b6e219289a30d8b270c58b5ef56 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Fri, 8 Sep 2023 19:36:42 +0800 Subject: [PATCH] Courses.php: better spacing and better variable name (academic -> academic_year) --- Courses.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Courses.php b/Courses.php index 8bdd049..a32aef8 100644 --- a/Courses.php +++ b/Courses.php @@ -567,32 +567,31 @@ include 'Header.php'; INNER JOIN course_students_table ON course_students_table.Course_ID=courses_table.Course_ID WHERE course_students_table.Student_ID=$student_id ORDER BY Academic_Year DESC, URL ASC"); - if(mysqli_num_rows($result)==0) - { + if (mysqli_num_rows($result) == 0) { echo " You are not enrolled in any Course"; } else { while($row = mysqli_fetch_assoc($result)) { - $name=$row['Course_Name']; - $code=$row['Course_Code']; - $faculty=$row['Faculty']; - $lecturer=$row['Full_Name']; - $academic=$row['Academic_Year']; - $url=$row['URL']; - $id=$row['Course_ID']; - $Status=$row['Status']; + $name = $row['Course_Name']; + $code = $row['Course_Code']; + $faculty = $row['Faculty']; + $lecturer = $row['Full_Name']; + $academic_year = $row['Academic_Year']; + $url = $row['URL']; + $id = $row['Course_ID']; + $Status = $row['Status']; if($Status=="Joined") { echo "
($code) - $name
($url)     $Status      -
Faculty: $faculty   Year: $academic   Lecturer: $lecturer
+
Faculty: $faculty   Year: $academic_year   Lecturer: $lecturer "; } else { echo "
($code) - $name $Status -
Faculty: $faculty   Year: $academic   Lecturer: $lecturer
+
Faculty: $faculty   Year: $academic_year   Lecturer: $lecturer "; } }