COMP 519: Web Programming
Fall 2012

Assignment 4: PHP and mySQL Registration Page

Deadline: 14 December 2012

Submission of work
Please remember to have your webpage(s) online so that I can access them via a web browser and to submit them to the Coursework Submission System 5pm on the day they are due.

When you submit your files, be sure to include all relevant HTML/PHP files and include an SQL dump of the relevant table(s) that you are using for this assignment. (Use the "mysqldump" command to generate this file, as outlined in the notes.)

Having your webpages online is a necessary part of this assignment so that I can accurately assess they are working correctly.

PROBLEM

There are 32 students assigned to a module. In order to organize module demonstrations, the class should be split into four groups with different time slots. Each group should consist of 8 students. The module lecturer decided to have a registration webpage to allow students to sign up for one of the demonstrations. A student visiting the page should be able to submit her name, student ID, email address, and book a place in one of the time slots. For example, the registration Web page of COMP207 looks like this:

registration

The submitted data should be stored in a database which is maintained on a server. The webpage and the server should interact with each other at every step of the registration process. The page should show how many free places are available in each time slot, announcing and blocking all fully booked time slots. After a student makes a data submission, it should check whether the student has been already registered. If not, the data is stored on the server and the student is notified about her registration. Otherwise (if already registered), the student should be prompted to ensure that she wants to change her registration to the new section (and removed from the current one she is registered for).

As a means of checking which students are registered in each section, you should also write a separate webpage that will allow the module lecturer to choose a section and, after querying the database, will display the list of students who are registered in that section to a webpage.

ASSIGNMENT

For your assignment, you are to write a registration webpage using HTML, CSS, JavaScript, PHP and mySQL.

Part 1 (70 pts)

The database must fully implement the registration process, maintaining the submitted information. The server and page behavior must meet the requirements listed above. In addition, (basic) help facilities should be provided. The separate page for the lecturer should also be working so that he/she can see the students currently enrolled.

Part 2 (30 points)

The specific look and feel of the pages as well as the database implementation is left intentionally vague, allowing considerable design freedom on your part. However, the page should have a nice look and the code should satisfy common standards. You may also add additional features to your page. For example, you can add JavaScript and/or PHP functions which can validate the name (for example, that the field isn't empty), SID (that it has only numbers in it), and email fields.

Important note: It is assumed that your HTML/PHP code you write will comply with the XHTML Strict 1.0 standards (or better). Failure to do so will result in a loss of marks from your grade. Please include an appropriate Document Type Declaration in your file(s) and consider using the W3C validator.

Final mark

This assignment contributes 1/4 of the 75% continuous assessment part of the course grade.

For additional information on assessment criteria, penalties for late submission, and policy on plagiarism and collusion, see the main COMP519 web page. When submitting your solution, don't forget to include a completed and signed Declaration on Plagiarism and Collusion.