Just trying to get a very simple form working
Getting a
Parse error: syntax error, unexpected T_IS_EQUAL on line 10
<?php
$to = "";
$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($name || $email || $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>"; }
?>
I know its something with the checking if the fields are blank, but I can't find what
Thanks