< Back

Test #1: Coding Portion

  1. Write a webpage called Registration.php. This page will allow a professor to register students for their class. There should be two text fields on the page: first name and last name. This page should submit to itself, and display the list of currently registered students above the registration form. The professor should have the ability to remove students they have previously registered.

    You must store the list of registered students in a session variable.

  2. Write a webpage called Election.html. Pick two candidates that are running for some arbitrary office. Your webpage will allow users to vote for one of the two candidates. There should be two buttons on the page, one for each candidate. When the user presses one of the buttons, an AJAX call should be made to update the running tally of votes for that individual. At the bottom of the page, there should be an updated tally of the current votes. This tally should be updated whenever either button is pressed.

    For bonus points, modify the above code such that the tally at the bottom of the page is updated every 5 seconds.

Email all of your files to both of these files to Scotty by 11:40 AM on November 4th, 2014.