 |
|
|
|
|
We welcome you to stop by from 7 A.M. to 5 P.M. Mon-Fri or by appointment.
Telephone: (207) 278-3539
Email: info@yodersawmill.com
Or you can fill out and submit this form:
|
// BEGIN FORM
if(!$_POST['submit'])
{
?>
}
else {
// set up error list array
$errorList = array();
$count = 0;
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$comments = $_POST['comments'];
$time = $_POST['time'];
$services = $_POST['services'];
// validate text input fields
if (!$name) { $errorList[$count] = "Required Field: Name"; $count++;
if (!(ereg("^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))){ $errorList[$count] = "E-mail Address does not appear to be valid"; $count++; }
if(preg_match('/http|www/i',$comments)) {
$errorList[$count] .= "We do not allow this in the comment. ";
}
}
// if none found...
if (sizeof($errorList) == 0){
$date=date("F d, Y");
$message="Name: ". $name .
"\n Phone: ". $phone .
"\n Email: ". $email .
"\n Comments: ".$comments.
"\n Best Contact Time: ".$time.
"\n Date Sent: ".$date.
"\n\n";
// REMOVE STUFF //
$message=ereg_replace('[*<>#%]+','',$message);
// SEND MAIL //
$subject = "Yoders Contact Form";
// $sendto = "info@mainegraphics.com";
$sendto = "info@yodersawmill.com";
//$header = "From:". $email;
// REMOVE STUFF //
$name=ereg_replace('[*<>#%]+','',$name);
$phone=ereg_replace('[*<>#%]+','',$phone);
$email=ereg_replace('[*<>#%]+','',$email);
$comments=ereg_replace('[*<>#%]+','',$comments);
$header = "From: " . $name . "<" . $email . ">\r\n";
mail($sendto, $subject, $message, $header);
?>
| Thank You. The following information has been submitted: |
| Name: echo $name ;?> |
| Telephone: echo $phone ;?> |
| Email: echo $email ;?> |
| Best Contact Time: echo $time ;?> |
| Comments: echo $comments ;?> |
}
else
{
?>
// errors occurred
// print as list
echo "
Please go back and correct the following form fields: ";
echo "";
for ($x=0; $x$errorList[$x]";
}
echo " ";
}
?>
|
}
?>
|
|
Melvin Yoder
910 Exeter Rd.
Corinna, ME 04928
(207) 278-3539 |
|
|
| © Yoder's Sawmill 2003 All Rights Reserved |
Pages designed and maintained by Maine Graphics
|
|