/*********************************************************************** * froshims7.php * * Computer Science 50 * David J. Malan * * Implements a registration form for Frosh IMs. Submits to itself. * Generates list of dorms via an array. Pre-populates name and * dorm fields upon error. **********************************************************************/ // array of dorms $DORMS = array( "Apley Court", "Canaday", "Grays", "Greenough", "Hollis", "Holworthy", "Hurlbut", "Lionel", "Matthews", "Mower", "Pennypacker", "Stoughton", "Straus", "Thayer", "Weld", "Wigglesworth" ); // if form was actually submitted, check for error if (isset($_POST["action"])) { if (empty($_POST["name"]) || empty($_POST["gender"]) || empty($_POST["dorm"])) $error = true; } ?>