$referer_value) { if ($referer_value == $_SERVER['HTTP_REFERER']) { $notfound = false; break; } } if ($notfound === true) { header("Location: http://www.clinardhome.com"); exit; } } // end of function referer_check function check_email($email, $optional=false) { if ( (strlen($email) == 0) && ($optional === true) ) { return true; } elseif ( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email) ) { return true; } else { return false; } } // end of function check_email // process form referer_check(); // field validations $errMsg = ''; $required = array('FirstName', 'LastName', 'Email', 'Address', 'City', 'State', 'ZipCode'); foreach ( $_POST AS $fieldname => $value ) { if ( in_array($fieldname, $required) ) { if ( empty($value) ) $errMsg .= "
$fieldname is required. Please correct all missing values"; elseif ( $fieldname == 'Email' && !check_email($value) ) $errMsg .= "
Email is invalid"; } } // validation completed. If errors exist, report; else send email if ($errMsg!='') { // report errors $errMsg = '

Please complete the following fields:' . $errMsg . '

'; } else { // no errors $emailTo = '"Betty" '; // prod // $emailTo = '"Test" '; // test $emailFrom = '"ClinardHome.com" '; $emailSubject = "Message received from clinardhome.com"; $emailFormData = ''; foreach ( $_POST AS $fieldname => $value ) { if ( $fieldname != 'Submit' ) { if ( $fieldname == 'Email' ) $emailFormData .= "$fieldname: $value
\n"; elseif ( count($value) > 1 ) $emailFormData .= "$fieldname: " . implode(', ', $value) . "
\n"; // field is an array else $emailFormData .= "$fieldname: $value
\n"; } } $emailHeader = "From: $emailFrom\n" . 'Cc: "Stephanie Wheatcraft" ' . "\n" . 'Bcc: "Lane" ' . "\n" . "Reply-To: $emailFrom\n" . "Return-Path: $emailFrom\n" . "X-Sender: $emailFrom\n" . "X-Mailer: PHP\n" . "X-Priority: 3\n" . "MIME-Version: 1.0\n" . "Content-Type: text/html; charset=\"ISO-8859-1\"\n" . "Content-Transfer-Encoding: base64\n" . "\n"; $emailBody = chunk_split(base64_encode("\n" . "\n" . "Message received from clinardhome.com\n" . "\n" . "\n" . "

$emailFormData" . "\n" . "\n" . "\n" . "")) . "\n"; if ( mail($emailTo, $emailSubject, $emailBody, $emailHeader) ) { $errMsg = "

Thank you for contacting Clinard Home Improvement.
"; $submitted = TRUE; } else $errMsg = "An error has occurred."; } // end if errors exist } ?> Contact Us, Referrals, Estimates, Clinard Home Improvement, Nashville, TN

Contact Us

If you have questions about Clinard Home Improvement, please give us a call. You can contact us at 615-399-3066 or by completing and submitting the form below. If you would like to earn $50, please visit our referral form.




First Name *
Last Name *
Company Name (If Applicable)
E-mail Address *
Primary Phone
Secondary Phone
Address *
City *
State *
Zip Code *
Improvements you are planning
What are you interested in? (check all that apply):
> Roofs    > Flashing/Sheet Metal   
> Gutter Cap    > Gutters   
> Siding/Trim    > Replacement Windows   
> Carport/Patio/Awning    > Sunroom   
> Employment    > Hardie Plank   
How did you find our website?
Would you like to receive periodic emails from Clinard Home Improvement regarding…? (please check all that apply):
/> Our Quarterly E-Newsletter /> Seasonal Discounts
/>Special Deals and Promotions
Interested in referring a friend or colleague and earning $50?
/> No. I’m Not Interested
/> Yes. I’m interested
Comments/Questions

Privacy Statement:
The information which you give in completing this form will be forwarded to the designated party for its use and will not be used for any other purpose or provided by us to any other parties. If you wish information concerning the privacy policy or the designated recipient, you should contact them directly.


* Required to submit this form

>

Follow Us

Twitter

Facebook