Create("churchil_demo"); /* If we've got any data handed in via CGI, then add the * new catagory to the database. Do some error checking * first though */ if ($NewLoc != "") { /* First check to make sure the user has included all * of the required variables. If not, gripe about it * and return them a page with the existing info filled * out already. */ $error = 0; $error += RequiredVar("Name",$Name); $error += RequiredVar("Address",$Addr1); $error += RequiredVar("City",$City); $error += RequiredVar("State",$State); $error += RequiredVar("Zipcde",$ZipCode); if ($error == 0) { $date = strftime("%Y-%m-%d",time()); $insert = "insert into Locations values (0,'" . AddSlashes($Name) . "', '" . AddSlashes($Addr1) . "', '" . AddSlashes($Addr2) . "', '" . AddSlashes($Addr3) . "', '" . AddSlashes($City) . "', '$State', '$ZipCode', '$Phone'," . "'$Fax', '" . AddSlashes($Notes) . "', '" . AddSlashes($Directions) . "', '$date')"; $sql->Insert($insert); echo("
\n"); echo("

Created new location: $Name\n"); echo("

\n"); echo("


\n"); /* Clear the values so that they don't appear * in the next Add Location form. If these variables * are not cleared (i.e. there were errors) then the * previously entered values will reappear in the form * so that the user doesn't need to reenter them. */ $Name = ""; $Addr1 = ""; $Addr2 = ""; $Addr3 = ""; $City = ""; $State = ""; $ZipCode = ""; $Phone = ""; $Fax = ""; $Notes = ""; $Directions = ""; } } ?>
Add a New Location
Name
Address
 
 
City
State
ZipCode
Phone
Fax
Notes

Is the location handicapped accessable? Does it have an ATM onsite? Put down anything which sets this site off from others.

Note: HTML tags are valid input within the notes.

Directions

Note: HTML tags are valid within the directions. A graphic showing directions would really help. See Mapquest.