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

**URL:** <https://forum.kirupa.com/t/radio-buttons-this-doesnt-seem-to-work/182798>\
**Category:** Uncategorized\
**Created:** [March 21, 2006, 2:52pm UTC](https://forum.kirupa.com/t/radio-buttons-this-doesnt-seem-to-work/182798 "2006-03-21T14:52:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [March 21, 2006, 2:52pm UTC](https://forum.kirupa.com/t/radio-buttons-this-doesnt-seem-to-work/182798/1 "2006-03-21T14:52:57Z")

</div>

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

<?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

```auto

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

---

<div class="post-metadata">

**Author:** ![Voccart](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Voccart](https://forum.kirupa.com/u/Voccart)\
**Post date:** [March 22, 2006, 12:23am UTC](https://forum.kirupa.com/t/radio-buttons-this-doesnt-seem-to-work/182798/2 "2006-03-22T00:23:13Z")

</div>

in your php file

replace this:

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

```

with this:

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

```

and

replace this:

```php
$message.="

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

```

with this:

```php
$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:

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

```

with this:

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

```
