Radio buttons... this doesn't seem to work

Aloha!

I have 3 optional questions on a survey with a yes or no answer.

each question is on its own form.
question 1 = form1(yes = rd1, no = rd2)<-components, group PrimaryGoal
question 2 = form2(yes = rd3, no = rd4)<-component, group SecondaryGoal
question 3 = form3(yes = rd5, no = rd6)<-component, group ThirdGoal

my php looks like this


<?php
$sendTo = "guillermo.valdivia@pgnmail.com";
$subject = "Optional Survey";
$message.="

Primary Goal: ".$_POST['primaryGoal'];
$message.="

Secondary Goal: ".$_POST['secondaryGoal'];
$message.="

Third Goal: ".$_POST['thirdGoal'];
mail($sendTo, $subject, $message,);
?>

I just need the answers so that’s why i don’t have the user email input or name.

my send coding button looks like this


on (release) {
var send_lv = new LoadVars();
send_lv.goal = primaryGoal.getValue();
send_lv.goal = secondaryGoal.getValue();
send_lv.goal = thirdGoal.getValue();
send_lv.sendAndLoad("email.php", send_lv, "POST");
unloadMovieNum(16);
unloadMovieNum(20);
loadMovieNum("intro2.swf", 15);
loadMovieNum("main2.swf", 20);
}

i might be missing something… please help me fix this.

thanks

in your php file

replace this:

mail($sendTo, $subject, $message,);

with this:

mail($sendTo, $subject, $message);

and

replace this:

$message.="

Primary Goal: ".$_POST['primaryGoal'];

with this:

$message ="

Primary Goal: ".$_POST['primaryGoal'];

looking at your AS…

your sending only the var goal to the phpscript.
1st you set the var with the value "primaryGoal.[COLOR=#000080]getValue[/COLOR]COLOR=#000000[/COLOR]"
and then you overwrite it with “secondaryGoal.[COLOR=#000080]getValue[/COLOR]COLOR=#000000[/COLOR]” and last you asign “thirdGoal.[COLOR=#000080]getValue[/COLOR]COLOR=#000000[/COLOR]” to goal. so you sending only one var (goal) to php with the “thirdGoal.[COLOR=#000080]getValue[/COLOR]COLOR=#000000[/COLOR]” value.

replace this:

send_lv.goal = primaryGoal.getValue();
send_lv.goal = secondaryGoal.getValue();
send_lv.goal = thirdGoal.getValue();

with this:

send_lv.primaryGoal = primaryGoal.getValue();
send_lv.secondaryGoal = secondaryGoal.getValue();
send_lv.thirdGoal = thirdGoal.getValue();