19th November 2009 21:04
#1
AS2 email form with PHP uses checkboxes
Hi all,
I have an email form in Flash AS2 with php code which works fine....until i try to add check boxes.
Help me PLS!!
AS2 code:
stop();
//makes Chackboxes able to be accessed by tab.
import fl.accessibility.CheckBoxAccImpl;
CheckBoxAccImpl.enableAccessibility();
name = "";
mail = "";
message = "";
phone = "";
cell = "";
event="";
honor = "";
event = "";
eventafternoon = "";
eventevening = "";
//Trying to make Flash recognize when a box is checked
function submitContact() {
new LoadVars();
if(f8.selected) afternoonVar= "afternoon";
}
{if(f9.selected) eveningVarVar = "evening";
}
else {afternoonVar= "not afternoon";
}
else {eveningVar= "not evening";
}
}
// SET TAB INDEX
f1.tabIndex = 0;
f2.tabIndex = 1;
f3.tabIndex = 2;
f4.tabIndex = 3;
f5.tabIndex = 4;
f6.tabIndex = 5;
f7.tabIndex = 6;
//f8.tabIndex = 7;
//f9.tabIndex = 8;
f10.tabIndex = 9;
submitButton.onRelease = function(){
recipient = "email@gmail.com"; // FORM WILL BE SENT TO THIS E-MAIL.
subject = "Inquiry from your site";
loadVariablesNum("form.php", "", "POST");
thanks.gotoAndStop(2);
}
PHP CODE:
<?php
$corps="\n\nNAME:\n ".$_POST["name"]."\n\nE-MAIL: \n ".$_POST["email"]."\n\nPHONE: \n ".$_POST["phone"]."\n\nMESSAGE: \n ".$_POST["message"]."\n\nCELL: \n ".$_POST["cell"]."\n\nEVENT: \n ".$_POST["event"]."\n\nHONOR: \n ".$_POST["honor"]."\n\nTIME START: \n ".$_POST["eventafternoon"]."\n\nTIME END: \n ".$_POST["eventevening"]."\n\nDATE: \n ".$_POST["date"]."\n".
$v1="None";
$headers="From: ".$_POST["mail"];
mail($_POST["recipient"],$_POST["subject"],$corps,$headers);
?>
Help PLEASE!!
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks