Use only MySQL commands.
PHP provides us with techniques to modularize and reuse our web application code. You need to refactor your web pages so that common static HTML elements such a menu, header and footer are written in common text files which are then included into your web pages. Name the include file(s) with a .inc
Create a table attempts in your MySQL database. The information in each attempt record should include the following fields with appropriate data types:
Attempt id (auto-generated primary key)
Date and time of the attempt (generated by PHP) First name
The number of the attempt (1 -3)
Score for the attempt
When a user submits a quiz attempt to the website, if an attempts table does not already exist in your database it should be programmatically created by your code.
3. Markingthequizattheserverandaddingvalidatedrecordtotheattempts table
Adapt the quiz form ([login to view URL]) you developed in Parts 1A and 21Bto add quiz attempt records to the table. This form should submit the data to a php script called markquiz.php.
While you will have done client-side validation in Parts 1A & 1B, in order to preserve the integrity of the server data you should also implement server-side data format checking.
In addition to type-checking the quiz responses, check the integrity of the data input by the users. All input data should be sanitized. No required fields should be empty.
Create a web page with a link on the menu that allows a supervisor to make the following queries of the attempts table:
List all attempts.
List all attempts for a particular Employee (given an Employee id OR name).
List all Employees (id, first and last name) who got 100% on their first attempt.
List all Employees (id, first and last name) got less than 50% on their third attempt.
Delete all attempts for a particular employee (given an employee id).
Change the score for a quiz attempt (given an employee id).
to implemented access to the supervisor page and its queries.
a php script called [login to view URL] (and other appropriately named pages if necessary)