FORUMS: list search recent posts

Flash + PHP email form

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
tony sader
Flash + PHP email form
on Nov 12, 2008 at 9:25:01 am

Hi guys,

I have a frustrating situation here. I have created an email form in Flash (AS2) which looks like this:

var sendLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

send_mc.onRelease = function() {
sendLoad.theTitle = theTitle.text;
sendLoad.theName = theName.text;
sendLoad.theEmail = theEmail.text;
sendLoad.theMessage = theMessage.text;
sendLoad.sendAndLoad("contact.php",receiveLoad);
}

And the PHP code looks like this:


$to = "xxxxxxx@hotmail.com";
$subject = "Tony Sadr Contact Form";
$message .= "Title: " . $theTitle;
$message .= "nName: " . $theName;
$message .= "nEmail: " . $theEmail;
$message .= "nnMessage: " . $theMessage;
$headers = "From: $theEmail";
$headers .= "nReply-To: $theEmail";

mail($to,$subject,$message,$headers);

?>

The email is sent and does arrive but without any data. the email sent looks like this:

Title:
Name:
Email:

Message:

This only which is sent correctly is the subject nothing else. Am I missing something here? could someone help me out? Thank you in advance!


Return to posts index

Sam Mattern
Re: Flash + PHP email form
on Nov 18, 2008 at 6:49:51 pm

Try this for your PHP:

$to = "xxxxxxx@hotmail.com";
$subject = "Tony Sadr Contact Form";
$message .= "Title: " . $_POST["theTitle"];
$message .= "nName: " . $_POST["theName;
$message .= "nEmail: " . $_POST["theEmail];
$message .= "nnMessage: " . $_POST["theMessage];
$headers = "From: $_POST["theEmail"];
$headers .= "nReply-To: $_POST["theEmail"];

Try this for your Flash:
sendLoad.sendAndLoad("contact.php","POST");

Best of providence,
Sam


Return to posts index

Joshua Farcone
Re: Flash + PHP email form
on Jan 5, 2011 at 5:10:03 am

This code worked for me thanks sam


Return to posts index


Sam Mattern
Re: Flash + PHP email form
on Jan 5, 2011 at 2:09:13 pm

Just realized they stripped my "\" from in front of the "n"s. Glad it worked for you.

-Sam


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]