Hello all.
On my site the contact.php form and script doesnt seem to work when you click send.
I have two compulsory fields... the name and the email address, then subject and message as two further fields.
When the person clicks send this script sits behind the button
on (release) {
if ((nameVar=="")||(emailVar=="")) {
errormessage="Please fill name and email fields";
} else {
errormessage="Sending....";
send="yes";
this.loadVariables("contact.php",'POST');
nameVar="";
emailVar="";
subjectVar="";
msgVar="";
}
}
My contact.php script is as follows:
<?
if ($send=="yes") {
$sendTo = "myemail@myemail.com";
if ($subjectVar=="") { $subject="Contact from Website"; } else { $subject="$subjectVar"; }
$body = "$msgVar";
$headers = "From: " . $nameVar;
$headers .= "<" . $emailVar . ">\r\n";
$headers .= "Reply-To: " . $emailVar;
mail($sendTo, $subject, $body, $headers);
}
echo "&errormessage=Email has been sent&";
?>
Can anyone tell me why I am not receiving any of the mails?
I have tried 3 different email addresses in the part where i can enter one and I have tried hosting on two different servers, one of which definitely supports php.
Many thanks.
Ian