Fill out this form and we will respond as quickly as possible
$value) { // yes -- strip tags and leading/trailing spaces
$_POST[$key] = strip_tags(trim($value));
}
$error = '';
// this tests for a blank text-input field (make sure to initialize text fields above)
if ($_POST['name'] =='') {
$error .= '
Name is required
';
}
if ($_POST['phone'] =='') {
$error .= '
Phone is required
';
}
if ($_POST['company'] =='') {
$error .= '
Company is required
';
}
if ($_POST['address1'] =='') {
$error .= '
Address is required
';
}
// don't require second address field
if ($_POST['citystzip'] =='') {
$error .= '
City, State and Zip required
';
}
if ($_POST['youremail'] =='') {
$error .= '
Email is required
';
}
// don't require fax
if ($error != '') { // there are errors, re-display the form
showForm($error);
showBottom();
exit;
}
// form is OK, say thanks and mail the results
print 'Thank you for your request. We will contact you soon.';
showBottom();
$to = 'jmorris@morrisgraphics.com';
$headers = "From: jmorris@morrisgraphics.com\n";
$subject = 'Comment from a web user';
$message = "Name: $_POST[name];
Phone: $_POST[phone];
Company: $_POST[company];
Address1: $_POST[address1];
Address2: $_POST[address2];
City, State, Zip: $_POST[citystzip];
Email: $_POST[youremail];
Fax: $_POST[yourfax];
Comments: $_POST[comment]";
mail($to, $subject, $message, $headers);
exit;
function showBottom() {
?>