require("util.php3"); DoTitle("ACME Party Balloons - Add a New Location"); $sql = new MySQL_class; $sql->Create("churchil_demo"); # If the user has submitted some data, check to make sure # they've filled in all of the required fields. If not, # print out some errors and prompt them to fill in the # correct values. if ($NewLoc == "Yes") { $error = 0; $error += RequiredVar("Location Name",$Name); $error += RequiredVar("Address",$Addr1); $error += RequiredVar("City",$City); $error += RequiredVar("State",$State); $error += RequiredVar("Phone",$Phone); if ($error == 0) { # Ok, we've got valid information. Cool. Insert # the new location into the database. $insert = "insert into ACME_Locations values(0, '". AddSlashes($Name) . "', '". AddSlashes($Addr1) ."', '". AddSlashes($Addr2) . "', '". AddSlashes($Addr3) ."', '". AddSlashes($City) . "', '$State', '". AddSlashes($Phone) . "', '" . AddSlashes($Directions)."')"; $sql->Insert($insert); echo("