PDA

View Full Version : sending info to an email


Kaue
02-16-2005, 12:44 PM
Hello guys I´m having a little problem. I´m trying to send some information from a flash form to an email address, and I´m doing that using a php file,

In the flash file I call this function:

loadVariablesNum("enviaForm.php", 0, "POST");

The enviaForm.php file has this code;

<?

$to = "info@ipdesystems.com";
$subject = "Contact";

$mailheaders = "Message coming from the site \n";

$mailheaders .= "Answer to: $email\n\n";

$msg = "Name: $name\n";
$msg .= "E-Mail: $email\n";
$msg .= "Message: $message\n\n";

mail($to, $subject, $msg, $mailheaders) or die ("Error sending the message!");

?>

After the user presses “send”, all the variables are being sent ok, (except for one!), the $message variable that is a textfield that is inside a movie clip. So my question is; Is there a way I can retrieve this textfields value that is placed inside a movie clip which is in the same scene as the other variables? Thanks a lot.

CyanBlue
02-16-2005, 02:39 PM
Howdy and Welcome... :)

You might want to use LoadVars() object instead of loadVariablsNum() function...
Instead of that loadVariablesNum() line, try this...

email_lv = new LoadVars();
email_lv.email = "email address you want to send";
email_lv.name = "name you want to send";
email_lv.message = "message you want to send";
email_lv.sendAndLoad("enviaForm.php", email_lv, "POST");

Go check out the email tutorial from the tutorials section for more information...

noir
02-17-2005, 04:03 PM
I tried finding that tutorial and it is not there. Can you provide an address? Thanks.

CyanBlue
02-17-2005, 06:56 PM
That'll be the combination of these two tutorials...

http://www.actionscript.org/tutorials/intermediate/php_send_mail/index.shtml
http://www.actionscript.org/tutorials/beginner/loadVariables_and_loadVars/index.shtml

Go check out the tutorials section at the Kirupa as well for one...