I created a form on my site using component boxes and i wrote the script, but the issue i am having (i believe) is when you hit “send” it does not locate the .php file on my server. The PHP file is called send51.php and is located in this directory: http://www.houseofbrewsny.com/PHP
Any help would be great!
Here’s the script in Flash and I’ll put the PHP beneath it.
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.thePhone = thePhone.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad("<A href=“http://www.houseofbrewsny.com/PHP/send51.php",receiveLoad">http://www.houseofbrewsny.com/PHP/send51.php”,receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop(“success”);
}
else {
_root.gotoAndStop(“failed”);
}
}
PHP
<?PHP
$to = sjaworsk1@hotmail.com;
$subject = “Website Email Form”;
$message = "Name: " . $theName;
$message .= "
Email: " . $theEmail;
$message .= "
Phone: " . $thePhone;
$message .= "
Message: " . $theMessage;
$headers = “From: $theEmail”;
$headers .= "
Reply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo “sentOk=” . $sentOk;
?>