$form_block = "
";
if ($_POST[operation] != "ds") {
//they need to see the form
echo "$form_block";
} else if ($_POST[operation] == "ds"){
//check value of $_POST[name]
if ($_POST[name] == ""){
$name_err = "Please enter your name!
"; $send = "no"; } //check value of $_POST[email] if ($_POST[email] == ""){ $email_err = "Please enter your email address!
"; $send = "no"; } //check value of $_POST[phone] if ($_POST[phone] == ""){ $phone_err = "Please enter your phone number!
"; $send = "no"; } //check value of $_POST[comments] if ($_POST[comments] == ""){ $comments_err = "Please enter a message!
"; $send = "no"; } //check value of $_POST[type] if ($_POST[type] == ""){ $type_err = "Please select a type of service!
"; $send = "no"; } //check value of $_POST[features] if ($_POST[features] == ""){ $features_err = "Please select what features you want!
"; $send = "no"; } //check value of $_POST[media] if ($_POST[media] == ""){ $media_err = "How did you hear about us?
"; $send = "no"; } if ($send != "no") { $msg = "Email sent from WebDesigns by Sarah Albright\n"; $msg .= "Name: $_POST[name]\n"; $msg .= "Email Address: $_POST[email]\n"; $msg .= "Phone Number: $_POST[phone]\n"; $msg .= "Comments: $_POST[comments]\n\n"; $msg .="Type of Service: $_POST[type]\n\n"; $msg .= "Features: $_POST[features]\n\n"; $msg .= "How did you hear: $_POST[media]\n\n"; $to = "sarahalbright62@gmail.com"; $subject = "Contact Form Web2dx"; $mailheaders = "From: Web2dx\n";
$mailheaders .= "reply-to: $_POST[email]\n";
//send the mail
mail($to, $subject, $msg, $mailheaders);
//display confirmation to user
echo '
Contact us for a quote today!
Web Designs by Sarah Albright
Cell Phone: 817-366-0421
Email Address: sarahalbright62@gmail.com
"; $send = "no"; } //check value of $_POST[email] if ($_POST[email] == ""){ $email_err = "Please enter your email address!
"; $send = "no"; } //check value of $_POST[phone] if ($_POST[phone] == ""){ $phone_err = "Please enter your phone number!
"; $send = "no"; } //check value of $_POST[comments] if ($_POST[comments] == ""){ $comments_err = "Please enter a message!
"; $send = "no"; } //check value of $_POST[type] if ($_POST[type] == ""){ $type_err = "Please select a type of service!
"; $send = "no"; } //check value of $_POST[features] if ($_POST[features] == ""){ $features_err = "Please select what features you want!
"; $send = "no"; } //check value of $_POST[media] if ($_POST[media] == ""){ $media_err = "How did you hear about us?
"; $send = "no"; } if ($send != "no") { $msg = "Email sent from WebDesigns by Sarah Albright\n"; $msg .= "Name: $_POST[name]\n"; $msg .= "Email Address: $_POST[email]\n"; $msg .= "Phone Number: $_POST[phone]\n"; $msg .= "Comments: $_POST[comments]\n\n"; $msg .="Type of Service: $_POST[type]\n\n"; $msg .= "Features: $_POST[features]\n\n"; $msg .= "How did you hear: $_POST[media]\n\n"; $to = "sarahalbright62@gmail.com"; $subject = "Contact Form Web2dx"; $mailheaders = "From: Web2dx
Fort Worth Website Developer & Graphic Designer located in Fort Worth, TX serving Texas and Virginia businesses locally and nationally
Custom Web Designs by Sarah Albright
Thank you for submitting your information.
I will look forward to talking to you soon.
Have a great day!
Sarah Albright