Hi there- I’ve been searching the tutorials on creating Flash PHP Email Forms including radio buttons, and so far I have found some great links but no one has been able to troubleshoot for me. So maybe you can help.
I had this figured out and then I screwed it up. Any advice on what’s not right with my code, or even a point in the right direction ( I’m not asking you to do this for me, I’d like to learn) would be greatly appreciated.
I have a form with 3 input text boxes, and two radio buttons, yes/no in the group “avail”.
Here’s my PHP script:
<?php
$sendTo = “my web address is here”;
$subject = “Reunion RSVP”;
$headers = “From: " . $_POST[“name”] . “<” . $_POST[“email”] .”>
";
$headers .= "Reply-To: " . $_POST[“email”] . "
";
$headers .= "Return-path: " . $_POST[“email”];
$message = "Maiden Name: " .$_POST[“maiden”];
$message.= .$_POST[‘avail’];
$message = "Guest Name: " .$_POST[“guest”];
mail($sendTo, $subject, $message, $headers);
?>
.fla file:
Form has instance name of rsvpform
Radio Group ‘avail’:
Radio button “Yes” has instance name of rsvp_true
Radio button “No” has instance name of rsvp_false
Send button .as:
on (release)
{
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
// rsvpform.loadVariables(“email.php”, “POST”);
var rsvp_lv = new LoadVars();
rsvp_lv.name = rsvpform.name;
rsvp_lv.email = rsvpform.email;
rsvp_lv.maiden = rsvpform.maiden;
rsvp_lv.guest = rsvpform.guest;
if (rsvpform.rsvp_true.selected) {
rsvp_lv.avail = “Yes”;
}
else {
rsvp_lv.avail = “No”;
}
rsvp_lv.sendAndLoad(“rsvp.php”, rsvp_lv, “POST”);
}
I know I need to call the buttons, and I had that working but I tweaked it and can’t figure out how to get it back. Frustrated! I have books surrounding me on this stuff and still, such a simple task and I can’t figure it out.