I don't know what's wrong... But it still isn't working..
I hit submit and it jumps to message failed alert I created.
Here's the code again, maybe I did something wrong????
Can't tell you how much i appreciate your help this is driving me bonkers!
The Actionscript:
(here is a link to my FLA file: http://www.basiqs.com/sacred/contact.fla)
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
send.onRelease = function() {
senderload.name = thename.text;
senderload.email = theemail.text;
senderload.phone = phone.text;
senderload.how = how.selectedItem;
senderload.other = other.text;
senderload.referral = referral.text;
senderload.date = radioGroup.data;
senderload.seats = seats.selectedItem;
senderLoad.comments = comments.text;
senderLoad.sendAndLoad("http://www.basiqs.com/sacred/contact.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
gotoAndStop("success");
}
else {
gotoAndStop("failed");
}
}
Here is the PHP:
(http://www.basiqs.com/sacred/contact.php)
$to = 'gage@basiqs.com';
$subject = 'Sacred Actor Contact Form';
$message = '
<html>
<head>
<title>Sacred Actor Contact Form</title>
</head>
<body>
<p>
phone:' .$REQUEST['phone']. ' <br />
email:' .$REQUEST['theemail']. ' <br />
name: ' .$REQUEST['thename']. ' <br />
how: ' .$REQUEST['how']. ' <br />
other: ' .$REQUEST['other']. ' <br />
ref: ' .$REQUEST['referral']. ' <br />
seminar April: ' .$REQUEST['april']. ' <br />
seminar May: ' .$REQUEST['may']. ' <br />
seats: ' .$REQUEST['numberofseats']. ' <br />
comments: ' .$REQUEST['comments']. ' <br />
</p>
</body>
</html>
';
// HTML FORMATTED EMAIL
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// headers
$headers .= 'From: ' .$REQUEST['name']. ' <' .$REQUEST['email']. '>' . "\r\n";
// $headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
// $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
// Mail it
if(mail($to, $subject, $message, $headers))
// RETURN TO FLASH (WILL UPDATE)
else
// Messed UP TO FLASH (WILL UPDATE)