Still no email. I am using the original PHP and Swf sent in
the zip file from last evening. I can still get to the frame label
that says the message was sent, but there is no email.
<?php
$to = "eric.shomer@gmail.com";
$name = $_POST['visitor_name'];
$email = $_POST['visitor_email'];
$message = $_POST['visitor_comments'];
$phone = $_POST['visitor_phone'];
$subject = 'A Message from a Bodyshop client';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' .
"\r\n";
$headers .= 'From:'. $name .' <' . $email . '>' .
"\r\n";
$ok = mail($to, $subject, $message, $phone, $headers);
if($ok) {
echo "&response=passed&";
} else {
echo "&response=failed&";
}
?>
SWF******
this.stop();
// -------------------<send form
LoadVars>------------------- \\
var gatherForm:LoadVars = new LoadVars();
var receiveForm:LoadVars = new LoadVars();
receiveForm.onLoad = function() {
if (this.response == "passed") {
name_txt.text = "";
email_txt.text = "";
phone_txt.text = "";
msg_txt.text = "";
trace("email sent");
gotoAndStop("correct");
}
};
function sendForm() {
gatherForm.email_to = "eric.shomer@gmail.com";
gatherForm.visitor_comments = msg_txt.text;
gatherForm.visitor_name = name_txt.text;
gatherForm.visitor_email = email_txt.text;
gatherForm.visitor_phone = phone_txt.text;
// You may want to try the absolute http to this file i.e.
http://www.mydomain.com/form.php
// If you are testing on the local system and it doesn't
know how to parse php,
// you'll never get a response back from the file.
gatherForm.sendAndLoad("
http://www.bodyshopfitnesscenter.com/sources/Flash/form.php",
receiveForm, "POST");
}
// -------------------</send form
LoadVars>------------------- \\
//--------------------<submit button
AS>---------------------\\
// onRelease
submitBtn.onRelease = function() {
if (email_txt.text == "" || phone_txt.text == "" ||
name_txt.text == "" || msg_txt.text == "") {
gotoAndStop("error");
} else {
sendForm();
}
};
//--------------------</submit button
AS>---------------------\\