I have followed the tutorial for creating an email form in flash, however, when i click the send button nothing happens. The script I have on the button is…
on (release) {
if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
emailstatus = “PLEASE ENTER A VALID EMAIL ADDRESS”;
}
else if (!name.length) {
emailstatus = “PLEASE ENTER YOUR NAME”;
}
else if (!message.length) {
emailstatus = “PLEASE ENTER A MESSAGE”;
}
else {
form.loadVariables(“contactus.php”, “POST”);
emailstatus = “SENDING…”;
}
}
The php code is…
<?php
$sendTo = "contactus@theliveotakeover.com";
$subject = “Email from Site”;
$headers = "From: " . $_POST[“name”];
$headers .= “<” . $_POST[“email”] . ">
";
$headers .= "Reply-To: " . $_POST[“email”] . "
";
$headers .= "Return-Path: " . $_POST[“email”];
$message = $_POST[“message”];
mail($sendTo, $subject, $message, $headers);
?>
Can anyone see why it isnt working?