if ($_POST['submit']) { // Get the variables from the form post $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; // Check fields, if they're there, send the email; if not, display error page. if ($name && $email && $message) { // Put your email address in place of "email@business.com" mail("donna@charlestonwebeaver.com.com", $subject, $message, $from); $thankyou = 1; } else { $error = 1; } } ?>