Your Name field is empty"; } if (empty($_POST['email'])) { $errors[] = "The Your E-mail Address field is empty"; } else if ((!ereg(".+\@.+\..+", $_POST['email'])) || (!ereg("^[a-zA-Z0-9_@.-]+$", $_POST['email'])) || (getmxrr(substr($_POST['email'], strpos($_POST['email'], "@")+1), $null) != true)) { $errors[] = "The Your E-mail Address value is invalid"; } if ($_POST['subject'] == '') { $errors[] = "The Subject field is empty"; } if (empty($_POST['message'])) { $errors[] = "The Message field is empty"; } if (isset($errors)) { # *** Collate errors into message area $link = sprintf("< Try again >", urlencode($_POST['name']), urlencode($_POST['email']), urlencode($_POST['subject']), urlencode($_POST['message'])); $resultMessage = sprintf("Please correct the following problem%s with your message:
- %s

%s", (count($errors) > 1) ? "s" : "", implode("
- ", $errors), $link); } else { # *** Send email and set success message $headers = sprintf("From: %s <%s>\r\n", $_POST['name'], $_POST['email']); $body = sprintf("The following message was submitted via www.thegreatroomusa.com on %s:\n\n%s", date("l, F jS Y \a\\t g:ia"), $_POST['message']); mail('simplygreatrooms@aol.com', sprintf("%s - via thegreatroomusa.com", $_POST['subject']), $body, $headers); $resultMessage = "Your message has been sent successfully,

we will be in contact soon."; } } ?> The Great Room - Contact

Contact

Your Name:
Your E-mail Address:
Subject:
Message:

The Great Room

1911 Lincoln Blvd
Santa Monica, CA 90405

Phone 310.575.3335
Fax 310.575.3334

Store Hours:
Monday - Saturday: 10am - 6pm