I’m working in AS 2.0, Flash CS3. I want to make a contact form that allows a user to select the appropriate e-mail address from a combo box. I have made a working contact form that send to one e-mail address using PHP.
Here is the AS for it:
var sendLoad = new LoadVars ();
var receiveLoad = new LoadVars ();
send_btn.onRelease=function () {
sendLoad.name_input=name_input.text;
sendLoad.email_input=email_input.text;
sendLoad.message_input=message_input.text;
sendLoad.subject_input=subject_input.text;
if(name_input.text=="") {
name_dynamic.text = "*Name*";
} else if (email_input.text==""){
email_dynamic.text="*Email*";
subject_dynamic.text="*Subject*";
} else if(message_input.text==""){
message_dynamic.text="*Message*";
}else {
sendLoad.sendAndLoad("mail2.php", receiveLoad);
gotoAndStop (2)
}
}
and here is the PHP code:
<?php
$userEmail = $_POST[‘email_input’];
$to = $userEmail . “, my_email@my_domain.com”;
$subject = $_POST[‘subject_input’];
$message = "Name: ".$_POST[‘name_input’];
$message .= "
".$_POST[‘message_input’];
mail ($to, $subject,$message);
?>
Now… how do I make a Combobox that allows the user to select who to send their e-mail to? (all I want are 3 address)
Thanks a lot!