Creating Dynamic Web Sites Part 2 Chapter 3 Creating Dynamic Web Sites Part 2
One Page One page to display and handle the form. if (/* form has been submitted */) { // Handle the form } else { // Display the form }
if ($_SERVER[‘REQUEST_METHOD’]==‘POST’) { // Handle the form } else { // Display the form }
calculator.php Script 3.5 on page 87 http://csweb.hh.nku.edu/csc301/frank/ch03/script_03_05/calculator.php ch03\script_03_05\calculator.php
STICKY FORM Remembers how you have filled it out if the form must be resubmitted.
calculator.php Script 3.6 on pages 92-93 http://csweb.hh.nku.edu/csc301/frank/ch03/script_03_06/calculator.php ch03\script_03_06\calculator.php