# Radio button.... How do I do this?

**URL:** <https://forum.kirupa.com/t/radio-button-how-do-i-do-this/179676>\
**Category:** Uncategorized\
**Created:** [February 22, 2006, 6:06am UTC](https://forum.kirupa.com/t/radio-button-how-do-i-do-this/179676 "2006-02-22T06:06:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtrace](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dtrace](https://forum.kirupa.com/u/dtrace)\
**Post date:** [February 22, 2006, 6:06am UTC](https://forum.kirupa.com/t/radio-button-how-do-i-do-this/179676/1 "2006-02-22T06:06:48Z")

</div>

I have a series of five radio buttons…it’s a multiple choice question…that I need answered.  
I want which ever one the user clicks to be recorded and then sent to a PHP script which will then in turn send it in an email.  
I am also having them fill out a text field for their email , and the message they are sending.  
But how do I do this? I am lost and would appreciate some help.  
This is the PHP code…I’m using…

$sendTo = “[devon@devontracey.com](mailto:devon@devontracey.com)”;  
$subject = “My Flash site reply”;  
// variables are sent to this PHP page through  
// the POST method. $\_POST is a global associative array  
// of variables passed through this method. From that, we  
// can get the values sent to this page from Flash and  
// assign them to appropriate variables which can be used  
// in the PHP mail() function.

// header information not including sendTo and Subject  
// these all go in one variable. First, include From:  
$headers = “From: " . $\_POST[“firstName”] .” “. $\_POST[“lastname”] . “\<” . $\_POST[“email”] .”\>  
";  
// next include a replyto  
$headers .= "Reply-To: " . $\_POST[“email”] . "  
";  
// often email servers won’t allow emails to be sent to  
// domains other than their own. The return path here will  
// often lift that restriction so, for instance, you could send  
// email to a hotmail account. (hosting provider settings may vary)  
// technically bounced email is supposed to go to the return-path email  
$headers .= "Return-path: " . $\_POST[“email”];  
// now we can add the content of the message to a body variable  
$message = $\_POST[“message”];

// once the variables have been defined, they can be included  
// in the mail function call which will send you an email  
mail($sendTo, $subject, $message, $headers);  
?\>
