Code:Ice Cream Order 1

<?php /** * @author Ralph Morelli ram@tricoll.edu * @author Mihaela Sabin mihaela.sabin@unh.edu * @version Sep 17, 2010 * * FILE: ice_cream_order.php * * DESCRIPTION * Builds on search2.php and gives practice with various form elements: * textbox, textarea, checkbox, radio button, and drop-down menu. * * If form has not been submitted yet, it means that Order! button has not been set. * The function hasFormBeenSubmitted checks if the Order! button has been pressed. * The control section of the code uses if-else to either display a blank form or * to unveil the values of each of the form's elements. * * If non-text form elements (checkbox, radio button, drop-down menu) have * no default values OR no user input has been entered in any of them, * the $_GET associative array has no information about these elements. * * If a radio button has been selected, $_GET associative array has an item * whose key is the name of the radio buttons grouping, in our case 'topping'. * The value of $_GET['topping'] is then selection the use has made. For example, * $_GET['topping'] could be "butterScotchTopping". * * If one or more checkboxes have been selected, $_GET associative array has an * item whose key is the name of the array used to store checkbox selections, in * our case 'icecream' array. The value of $_GET['icecream'] is Array, meaning * that icecream is an indexed array. * */