I need desperate help with this php code integrated with flash please

Posted on 16th Feb 2014 by admin

Can someone please help me with this php code which I have been stuck on for weeks . I am trying to send mail from a flash movie to an email address using php but the mail does not appear at the address at all. I am using php enabled server xampp and I have been told to make changes in the php config file which i have done but it still does not seem to work any help guys?

this is the php code

<?PHP

$to = "dmm@live.co.uk";

$subject = "Flash Contact Form Submission";

$message = "Name: " .$_POST['theName'];

$message .="nEmail: " . $_POST[$'theEmail'];

$message .= "nnMessage: " .$_POST[$'theMessage'];

$headers = "From: $theEmail";

$headers .= "nReply-To: $theEmail";

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

?>

the flash code (actionscript 2.0)
stop();

var senderLoad:LoadVars = new LoadVars();
var recieveLoad:LoadVars = new LoadVars();

sender.onRelease = function () {

senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;

senderLoad.sendAndLoad("http://duanmmm.co.uk/send.php",recieveLoad);
}

receiveLoad.onLoad = function() {
if(this.sentOK) {
_root.gotoandStop("success")
}
else {
_root.gotoAndStop("failed");
}
}

Other forums