include_once("$_SERVER[DOCUMENT_ROOT]/include/standard.php");
$template->title='Contact Us';
$template->generate('header');
IF($_POST['submit']) {
$error=null;
IF(!$_POST[name]) { $errors[] = 'You need to enter your name.'; }
IF(!$_POST[company]) { $errors[] = 'You need to enter your School, District, or Company name.'; }
IF(!$_POST[position]) { $errors[] = 'You need to enter your job title.'; }
IF(!$_POST[email]) { $errors[] = 'You need to enter an e-mail address.'; }
IF(!$_POST[state]) { $errors[] = 'You need to enter your state.'; }
IF(!$_POST[newsletter]) { $errors[] = 'You need to specify whether or not you would like to receive our newsletter.'; }
IF(!$errors) {
$body = "
The Contact Form on the About Generation YES page was filled out.
Name: $_POST[name]
Address:
$_POST[company]
$_POST[position]
$_POST[address]
$_POST[city] $_POST[state], $_POST[zip]
Phone: $_POST[phone]
Email: $_POST[email]
Referral: $_POST[referral]
Tell them about: $_POST[info_request]
Subscribe to newsletter: $_POST[newsletter]
Notes: $_POST[comments]
";
$keywords = file($_SERVER[DOCUMENT_ROOT]."/scripts/filter.txt");
FOREACH($keywords AS $keyword) {
IF(eregi(rtrim($keyword),$body)) {
$spam++;
}
}
IF(!$spam) {
mail('
[email protected]', 'Potential Customer Questions', $body);
}
echo "
Thank you for submitting the contact form. We will get back to you shortly.
";
$template->generate('footer');
exit;
}
}
?>
Contact Us
Fields with an * are required.
If you have questions on how we protect your information, please check our Privacy
Policy.
IF (count($errors)) { ?>
Form Submission Error
FOREACH($errors AS $error) { ?>
- =$error?>
} ?>
} ?>