I trying to pass parameter to a PHP and get a response via the loadAndSend method, i succefully received the response of my PHP file, but im having a hard time Sending a simple variable from the flash to the php.
I have a form that should send 2 email, 1 to the email the customer puts in, and 1 to my email. As my email is written in the php code i received my email, but as im not recieving the email variable of the customer from the flash, so that email never arrives.
i have read almost every manual on internet and i think im doing it in the right way, but it still not working.
Here is my code:
This is in the first frame.
this.form_send.onRelease = function() {
var salida=new LoadVars();
var entrada=new LoadVars();
entrada.xxx=“Rock Lee”;
entrada.emxx=“rocklee@hotmail.com”;
salida.sendAndLoad(“send_email.php”, entrada, “post”);
entrada.onLoad = fn;
function fn(success)
{
_root.mc_textbox1.test=entrada.email_msg;
}
};
This go to the php, (without variables xxx and emxx, because i dont know why it isnt sending it) send the email to my email, but it should send another email to rocklee@hotmail.com (fiction email) but the php never receive that variable (emxx).
Here you go my php code:
<?php
$headers = $headers.“MIME-Version: 1.0
“;
$headers = $headers.“Content-type: text/html; charset=iso-8859-1
“;
$headers = $headers.“From: Dreamcatcher. <info@sdfsdfsdf.com>
“;
$para=$_POST[“emxx”];
$name=$_POST[“xxx”];
$subject=“Thank you”;
$body=””;
$body=$body.”<p align=‘justify’><strong>Dear $name:</strong></p>”;
if(mail($para, $subject, $body, $headers))
{
}
$para=“myemail@adsfasdfsd.com”;
$subject=“Message”;
$body=””;
$body=$body."<p align=‘center’>EMAIL</p>
“;
$body=$body.”<p align=‘justify’>Name: <strong>".$name."</strong></p>";
if(mail($para, $subject, $body, $headers))
{
echo “email_msg=Your request has been sent succesfully.”;
}
else
{
echo “email_msg=We detect some problems. Please try again.”;
}
?>
I received thos se messages in my flash, but never received the variables from flash.
Can ANYONE help please. I attached the files if you wanna take a look.
Greetings