Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The lab6.php is a PHP page that: Defines a constant named MAX_ITERATIONS that contains a value of 100. contains a self-referencing/self-submitting form(to achieve this the
The lab6.php is a PHP page that:
- Defines a constant named MAX_ITERATIONS that contains a value of 100.
- contains a self-referencing/self-submitting form(to achieve this the action attribute on the page's
- the form should be submitted in POST mode
- this page should, the first time the pages loads in the default GET mode, create empty string variables named $start, $stop, $incr, $error and $output (respectively used to store: the start temperature; the stop temperature; the temperature increment; any error messages generated by the data validation; and, the generated table output).
- has three (3) named text input boxes, one for a starting temperature, one for an ending temperature and one for the increment the user wants to increase the temperature by each.
- when submitted in POST mode, should store the three (3) inputted values from the $_POST[] array in variables named $start, $stop, and $incr
- performs a check that the data submitted is valid. Valid data means:
- that the user entered something in each field (i.e. they are not empty)
- that the user entered numbers in each field
- that the start temperature is less than the end temperature
- that the temperature increment is a positive (non-zero) number
- If all the above conditions are met, you should verify that there would not be more than MAX_ITERATIONS number of loops, based on the conditions set by the user. NOTE: this can be determined by making sure that ($stop - $start)/$incr is less than or equal to MAX_ITERATIONS (after all other data validation is completed)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started