Hey there.
Yet another post about formmail in Flash and PHP …
Well, I have been reading around in the posts, but I can’t quite figure it out.
Please anyone help. Henrik
I have a form in Flash set up with components and instance names: name, email and message.
The submit button is linked to a function sendForm
function sendForm() {
gatherForm.visitor_message = contactForm.message.text;
gatherForm.visitor_name = contactForm.name.text;
gatherForm.visitor_email = contactForm.email.text;
gatherForm.send(“mail.php”, “POST”);
}
I have the PHP file set up as in the tutorial:
$sendTo = "[email protected]";
$subject = “Mail from Fisk Design”;
$headers = “From: " . $_POST[“firstName”] .” “. $_POST[“lastName”] . “<” . $_POST[“email”] .”>
";
// next include a replyto
$headers .= "Reply-To: " . $_POST[“email”] . "
";
$headers .= "Return-path: " . $_POST[“email”];
$message = $_POST[“message”];
mail($sendTo, $subject, $message, $headers);
?>