File math.html contains a form that has to be processed with a PHP program that you will write. Perform the following tasks: 1. Show the name of your PHP program and your name in the form.
File math.html contains a form that has to be processed with a PHP program that you will write. Perform the following tasks:
1. Show the name of your PHP program and your name in the form.
2. Replace the fixed + sign in the form with a textbox, so that the user can enter + or -.
3. Write and test a PHP program that will do the following:
a. Validate that the operation in the textbox corresponds to the operation selected by the radio button in the operation radio button group.
b. Validate that the operands are integers with values corresponding to the selection in the grade radio button group.
c. Check that the result entered by the user is a correct integer. If so, send a message to the browser and ask for another submission of the form. If not, send to browser an error message and request resubmission of the form.
d. Keep track of the number of correct and incorrect answers of the user during the session and include both in the messages that acknowledge a correct result or notify for a wrong result, if the Display Summary checkbox is checked.
If there are validation errors, send an appropriate message to the browser and request resubmission of the form
Step by step
Solved in 2 steps