Dear FLASH-ers,
I can’t find what’s wrong with this PHP or FLASH code. I have a FLASH email form that runs from a PHP file. Pretty basic stuff, but for some reason it’s not working. Both the .swf and .php form are in the same directory in my server. The code is below, starting with the .php and followed by he ActionScript that’s in my .swf form. Please let me know if there’s something missing.
Thanks in advance
-----------------------------------< this is the PHP>-------------------------------
<?PHP
$to = "tony@giltstudios.com";
$subject = “GilT web Visitor”;
$theName=$_POST[‘theName’];
$theEmail=$_POST[‘theEmail’];
$theMessage=$_POST[‘theMessage’];
$message = "Name: " . $theName;
$message .= "
Email: " . $theEmail;
$message .= "
Message: " . $theMessage;
$headers = “From: $theEmail”;
$headers .= "
Reply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo “sentOk=” . $sentOk;
?>
------------------------< this is the ActionScript on the .swf>------------------
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad(“http://www.giltstudios.com/send_gilt.php”, receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop(“success”);
}
else {
_root.gotoAndStop(“failed”);
}
}