armdar
06-03-2009, 05:02 PM
Hello Everyone,
I am trying to send data from my flash form to my server and back to my email.
I've been trying to figure this out and got some help from Paul Ferrie (Super Mod) but I don't want to bother him too much.
Please tell me what I'm doing wrong.
The actions are on the first frame of the form, in a layer called "actions"
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.thePhone = thePhone.text;
senderLoad.theMail = theMail.text;
senderLoad.theBody = theBody.text;
senderLoad.sendAndLoad("http://www.mindovermatter.ca/send.php",receiveLoad,"POST");
};
receiveLoad.onLoad = function() {
if (this.sentOk) {
gotoAndStop("success");
} else {
gotoAndStop("failed");
}
};
<?PHP
$to = "[email protected]";
$subject = "Msg from MindOverMatter.ca";
$message = "Name: " . $theName;
$message .= "\nPhone Number: " . $thePhone;
$message .= "\n\nEmail: " . $theMail;
$message .= "\n\n\nMessage: " . $theBody;
$headers ="From: $theMail\n" . "Reply-To: $theMail" . "X-Mailer: PHP/" . phpversion();
$sentOK = mail($to,$subject,$message,$headers);
echo "sentOK=" . $sentOK;
?>What I did next:
Published .fla to html. Uploaded index.html to my public_http directory on my server, along with: AC_RunActiveContent.js, flash.swf, send.php
So all of these files are contained in the public_html directory
When I go to fill out the info and test the form, I am brought to the "sorry failed" frame... which is good and bad. It's good I'm being told it did not work, it's bad because it isn't working.
I have tested my email configurations to verify that I set it up properly and I am receiving email, so that isn't the problem.
any trouble shooting and outside input to help solve this problem is hugely appreciated
Here is a link to my .fla (http://rapidshare.com/files/240478345/flash_1_.zip.html) - please any feedback would be helpful!!
THANK YOU!
I am trying to send data from my flash form to my server and back to my email.
I've been trying to figure this out and got some help from Paul Ferrie (Super Mod) but I don't want to bother him too much.
Please tell me what I'm doing wrong.
The actions are on the first frame of the form, in a layer called "actions"
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.thePhone = thePhone.text;
senderLoad.theMail = theMail.text;
senderLoad.theBody = theBody.text;
senderLoad.sendAndLoad("http://www.mindovermatter.ca/send.php",receiveLoad,"POST");
};
receiveLoad.onLoad = function() {
if (this.sentOk) {
gotoAndStop("success");
} else {
gotoAndStop("failed");
}
};
<?PHP
$to = "[email protected]";
$subject = "Msg from MindOverMatter.ca";
$message = "Name: " . $theName;
$message .= "\nPhone Number: " . $thePhone;
$message .= "\n\nEmail: " . $theMail;
$message .= "\n\n\nMessage: " . $theBody;
$headers ="From: $theMail\n" . "Reply-To: $theMail" . "X-Mailer: PHP/" . phpversion();
$sentOK = mail($to,$subject,$message,$headers);
echo "sentOK=" . $sentOK;
?>What I did next:
Published .fla to html. Uploaded index.html to my public_http directory on my server, along with: AC_RunActiveContent.js, flash.swf, send.php
So all of these files are contained in the public_html directory
When I go to fill out the info and test the form, I am brought to the "sorry failed" frame... which is good and bad. It's good I'm being told it did not work, it's bad because it isn't working.
I have tested my email configurations to verify that I set it up properly and I am receiving email, so that isn't the problem.
any trouble shooting and outside input to help solve this problem is hugely appreciated
Here is a link to my .fla (http://rapidshare.com/files/240478345/flash_1_.zip.html) - please any feedback would be helpful!!
THANK YOU!