I'm pulling my hair out trying to get radio buttons to work using HTML and PHP.
I have some text fields and 5 radio buttons on a page. Here's the radio button HTML:
<input type="radio" name="q1" value="Excellent"/>   Excellent<br/> <input type="radio" name="q1" value="Very good"/>   Very good<br/> <input type="radio" name="q1" value="Good"/>   Good<br/> <input type="radio" name="q1" value="Fair"/>   Fair<br/> <input type="radio" name="q1" value="Poor"/>   Poor<br/>
When the use clicks Submit, I want to send the value of the selected button back to me via e-mail. I get all my text field info correctly, but for the radio buttons I just get "On" rather than the value.
Here are the relevant bits of PHP:
$q1_answer = $_POST['q1']; $body = "$q1_answer";
All the info I've found online tells me this happens if I don't assign the radio buttons a value, but I think I've done that correctly. Any ideas?
Thanks for your help!

New Topic/Question
Reply



MultiQuote




|