Contact Form
If you have any questions regarding our products or services, please contact us by calling or e-mailing us and we'll get back to you as soon as possible. We look forward to hearing from you.
// You may add more departments than what is here by adding more name1[x] and email1[x] fields in.
$name1[0] = 'Sales'; // Name of the first department
$email1[0] = 'sales@nowhrbm.com'; // Email of the first department
$name1[1] = 'Service';
$email1[1] = 'service@nowhrbm.com';
$c = count($name1);
$c2 = count($email1);
if($c != $c2){
die("You must have both name and email for EACH department.");
}
$subject = 'Website Comment Form Submission';
if($action=="send") {
$mailCheck = ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.
'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email);
if(!$name || !$company || !$phone || !$mailCheck || !$comment) {
echo ' ';
} else {
for ($i = 0; $i < $c; $i++) {
if($department==$name1[$i]) {
$to = $email1[$i];
}
}
$msgtxt = "
Name: $name
Company: $company
Phone: $phone
Email: $email
Site Contact Form Question or Comment:
$comment
";
$header = "To: ".$to."\n";
$header .= "From: ".$email."\r\n";
$mailresult = @mail("",$subject,$msgtxt,$header);
echo <<
| Contact Us: |
|
| Thank You!
Thank you for your feedback and we will get with you as soon as possible. |
|