For this project, you will create two files: An html file that contains a form, and a php file to process the information entered in the form.
You can view how these two files should work together by viewing the sample form, filling it out, and then submitting the form and viewing the result:
The main page should contain the usual header information and be well-formed xhtml. The page should contain a form that asks for the following input:
There should also be a submit button and a clear button. The clear button will clear data entered in all fields, while the submit button will call the php file and send it the results.
The following results should be displayed:
You must obtain the last name, first name, and middle initial for the results page by parsing the employee name submitted by the form, obtaining the tokens from that string, and displaying them separately as last name, first name, and middle initial.
To compute the gross pay, you will need to check the employee status. If the employee is exempt, then the pay rate entered is a weekly pay figure. This employee is exempt from overtime pay and will receive the same pay every week regardless of hours worked.
If the employee is an hourly employee, then the pay must be calculated by paying straight time for 40 hours or less and overtime pay (1.5 times the regular rate) for all hours worked in excess of 40. You must calculate hourly gross pay in a separate function to indicate that you know how to write and call functions. The function should be passed the payrate and hours worked and return the gross pay for an hourly employee. Since there is no calculation for exempt employees, their pay will not be calculated using the function.
Your form page should be called Proj2.html and your results page should be called Proj2.php. Both of these pages must be uploaded to the course server by the beginning of class on the due date noted in the course calendar for this project. Late submissions will not be considered.