- Impact
- 7
Hello, I need some help with my contact us form. What coding do I need to add to the following in order for it to check to make sure that the user has completed the "Message" field before they hit Send? If the message box is left blank, I do not want the email to send. Please tell me exactly what code I need to add to the code below and where I need to add it. Thanks and I greatly appreciate your help.
Here's the code:
Thanks,
Matt
Here's the code:
PHP:
<?php
$myemail = "*****@170designs.com";
if (!isset($visitormail))
echo "Somebody Goofed $ip" ;
$todayis = date("l, F j, Y, g:i a") ;
$subject = "$subject" ;
$message = "$todayis [EST] \n
Name: $visitor ($visitormail)\n
Message: $notes \n
";
$from = "From: $visitormail\n";
if ($myemail != "")
mail($myemail, $subject, $message, $from);
?>
Thanks,
Matt
















