MySQL & PHP Test Information

Do not reproduct this page, Your page to reproduce can be found here

Description

You are given three tables of information: courses, students, registration
See the table at right for details on the table structure
The courses table contains information about all the courses
The students table contains information about all the students
The registration table connects the two. Each row contains both the course ID and student ID it is linked to, as well as details about what period and semester that course occupies.

The registration table contains information saying "*this* student is registered in *this* class, and that class is in *this* period and *this* semester

the first row of inventory has the following details:
reg_id = 23
reg_stud_id = 3 (meaning this registration refers to student ID 3 --> Alladin Kelly)
reg_course_id = 1 (meaning this registration refers to class ID 1 --> --SPARE--)
reg_period = 3 (period 3)
reg_sem = 2 (semester 2)

Which is to say that the Alladin is registered as having a spare in period 3 of semester 2.

All of your work will be stored in the folder /var/www/html/students/studentFolder/XXXXXX/mysql-test/
An appropriate database.php will already be found there
You each have your own database, nothing you do will impact anyone else's work


Take a good look at the proceeding page to make sure you are reproducing its functionality correctly.

Specifications broken down by level:

As always, the raw level of your mark is determined via functionality as defined below.
Code commenting, formatting, variable/function naming and efficiency determines +/-

Level 1

  • Read from the 'courses' table to display a list of courses, sorted and displayed the same way as shown.
  • Have each course's code be a link to view their class list page (a link to 'classList.php')
  • This new page should at least list all the matching entries for that course in the 'registration' table in some way
Level 2
  • All requirements from Level 1
  • The 'classList.php' page should accurately display all the student names for that course's class list
    • NOTE: Do not worry about sorting this list
Level 3
  • All requirements from Level 2
  • Make it so every student's name is a link that directs to a student view page (a link to 'student.php')
  • This page should display information about the specific student clicked on in some way.
Level 4
  • All requirements from Level 3
  • On the 'student.php' page, a full timetable should be listed as in the example.
  • The course codes should be links that should redirect to the classList.php page for that course and work as described above.

Database Information

+-------------------+
| Tables            |
+-------------------+
| courses           |
| registration      |
| students          |
+-------------------+

courses table
+-------------+-------------+
| Field       | Type        |
+-------------+-------------+
| course_id   | int         |
| course_code | varchar(32) |
+-------------+-------------+

students table
+------------+---------------+
| Field      | Type          |
+------------+---------------+
| stud_id    | int           |
| stud_fname | varchar(128)  |
| stud_lname | varchar(128)  |
+-----------+----------------+

registration table
+---------------+------+
| Field         | Type |
+---------------+------+
| reg_id        | int  |
| reg_stud_id   | int  |
| reg_course_id | int  |
| reg_period    | int  |
| reg_sem       | int  |
+---------------+------+