David's Final Project
Video Game Quiz
This page describes the project and each file used in the final project
The project is a videogame quiz. If you are a new user, it will add you to the database
and give you a link to take the quiz. If you have already taken the quiz it will show your latest
score along with a table of everyones score sorted by highest score.
If you want to take the quiz: CLICK HERE
The project usese 2 MySQL databases.
- gamequiz - each user with score and grade
- grade - a description of each grade possible
-File Descriptions-
- vgquizwelcome.htm
- Start Here. The initial login screen where you enter your first and last name.
- quizhome.cgi
- The first screen after entering your name.
- param: fname,lname
- If you are new, it adds your first and last name to the database and assigns an id number. Gives a link to take the quiz.
- If you are returning, it shows what your last grade was and displays a table showing all users test results sorted by high score. Also give links to retake the quiz or leave (returns to the login screen).
- vgquiz.cgi
- Script containing the quiz.
- param: id,fname,lname
- HTML for the quiz uses a HERE clause.
- JavaScript verifies that each question has an answer selected and ALERTS if it does not.
- The id, fname, and lname values are hidden at the end of the form to be carried into the next page.
- quizgrade.cgi
- Script that grades the quiz and updates database.
- param: id,fname,lname,q1-q10
- Checks the values of q1 though q10 (selected answers) with the correct answers, determines the number of correct answers, and assigns a grade.
- Updates the gamequiz database with the results of the quiz.
- Shows the current results of the quiz along with a table of each past users score sorted by high score.
- Clicking the 'Continue' link takes you back to vghome.cgi
- quizsubs.lib
- Subroutine library.
- finalproject.htm
- This page.