<form method="post" action="contact.php" onsubmit="window.open('contact.php','popup','width=200,height=200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">
Name: <input name="name" type="text" maxlength="15" value="">
<br />
Email: <input name="email" type="text" maxlength="50" value="">
<br />
Suggestion:<br />
<textarea name="message" rows="5" cols="40" value=""></textarea>
<br>
<input type="submit" value="Submit"><input type="reset" value="Reset">
</form>
$to = "email ommitted";
$subject = "Contact Us";
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$embody = "Name: $name\nEmail: $email\nSuggestion: $message" ;
$sent = mail($to, $subject, $embody, $headers) ;
if(empty($name)||empty($mail)||empty($message)) {
echo "You seem to have left something out. Please fill in all the fields and try again.<br /><br /><a href=\"javascript:closeWindow();\">Close</a>"; }
else
if($sent)
{echo "Thank you $name, your mail has been sent successfully with the message of:<br /><br /><i>$message</i><br /><br /><a href=\"javascript:closeWindow();\">Close</a>"; }
else
{echo "We encountered an error sending your mail<br /><br /><a href=\"javascript:closeWindow();\">Close</a>"; }
?>
Still same problem :/ get blank error even when all boxes are filled, forgot to add the HTML form before. Possible conflict with value=""?