I've got a flash movie with a form that works fine with ASP for email processing but need to port it to PHP. I've tried doing this but the form simply won't send the data.
Here's the actionscript in the Flash movie:
on (release) {
if (!rname.length) {
info = "Please enter your name.";
}
else if (!raddress.length) {
info = "Please enter your address.";
}
else if (!rcity.length) {
info = "Please enter your city of residence.";
}
else if (!rstate.length) {
info = "Please enter your state.";
}
else if (!rzip.length) {
info = "Please enter your zip code";
}
else if (!rphone.length) {
info = "Please enter your phone number";
}
else if (!remail.length || remail.indexOf("@") == -1 || remail.indexOf(".") == -1) {
info = "Please enter a valid e-mail address.";
}
else if (!cardnumber.length) {
info = "Please enter your credit card number.";
}
else if (!expdate.length) {
info = "Please enter your card's expiration date.";
}
else {
team1.setData("82nd Airborne");
team2.setData("Special Forces");
team3.setData("Navy Seals");
team4.setData("N.V. Army");
team5.setData("V.C. Guerillas");
team6.setData("Hunter Teams");
teamsel = team.getValue();
trace(camp.getValue());
if (camp.getValue() == true){
campsel = "Yes";
}
else {
campsel = "No";
}
trace(specops.getValue());
if (specops.getValue() == true){
sosel = "Yes";
}
else {
sosel = "No";
}
ccv.setData("Visa");
ccm.setData("Master Card");
card = CreditCard.getValue();
loadVariablesNum ("regmail.php", "0", "POST");
gotoAndPlay(651);
}
}
And here's the PHP Mailer script:
<?PHP
$doMail = $_REQUEST['emailReply'];
$useremail = $_POST['remail'];
$subject = "Online Registration";
$Recipient = "emailaddress@sbcglobal.ne
t";
$Sender = $remail;
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
$from_address =
nl2br(htmlspecialchars($_P
OST['rname
'],ENT_QUO
TES));
$from_address .= " <";
$from_address .=
nl2br(htmlspecialchars($us
eremail,EN
T_QUOTES))
;
$from_address .= ">";
$email_message = "";
$email_message .= "The following registration was sent through the XXXXXXXXX.com website. \n\n";
$email_message .= "The following information was provided.\n";
$email_message .= "" . $_POST['rname'] . "\n";
$email_message .= "" . $_POST['raddress'] . "\n";
$email_message .= "" . $_POST['rcity'] . ", " . $_POST['rstate'] . " " . $_POST['rzip'] . "\n";
$email_message .= "Phone: " . $_POST['rphone'] . "\n";
$email_message .= "Email: " . $_POST['remail'] . "\n\n";
$email_message .= "REGISTRATION ORDER\n\n";
$email_message .= "Team Selected: " . $_POST['teamsel'] . "\n";
$email_message .= "Camping: " . $_POST['campsel'] . "\n";
$email_message .= "Special Ops: " . $_POST['sosel'] . "\n";
$email_message .= "Paint Cases: " . $_POST['casetot'] . "\n";
$email_message .= "Short Sleeve Shirts: " . $_POST['sslab'] . "\n";
$email_message .= "Long Sleeve Shirts: " . $_POST['lslab'] . "\n";
$email_message .= "ORDER TOTAL: " . $_POST['total'] . "\n";
$email_message .= "CC Name: " . $_POST['card'] . "\n";
$email_message .= "CC Number: " . $_POST['cardnumber'] . "\n";
$email_message .= "CC Exp Date: " . $_POST['expdate'] . "\n\n";
$tab_content = date("j F Y, g:i a");
$tab_content .= "\t";
$tab_content .= $REMOTE_ADDR;
$tab_content .= "\t";
$headers = "";
$headers .= "From: $Sender\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
mail($Recipient, $subject, $email_message, $headers);
?>
Anyone have any idea where I'm going wrong?