|
-
Jun 24th, 2012, 08:23 PM
#1
Thread Starter
Addicted Member
Multiple radio buttons selected
Hello Folks,
Can someone help me out here please.
I am using the PHP define function and everything is displaying as intended except that all the radio buttons can be selected instead of one.
Does anyone know how to fix this error please? My piece of code is pasted below.
Code:
<?php
define("america","<form><input name='5' type='radio' value='5'>$5<br/>
<input name='10' type='radio' value='10'>$10<br/>
<input name='20' type='radio' value='20'>$20<br/>
<p>Other: <input name='other' size='50' type='text'></p>
</form>");
?>
I want the user to select only one option and not two or three. I will appreciate your help please.
-
Jun 24th, 2012, 10:12 PM
#2
Re: Multiple radio buttons selected
To create a group, give all the input elements the same name.
-
Jun 25th, 2012, 01:54 AM
#3
Thread Starter
Addicted Member
Re: Multiple radio buttons selected
Thanks a lot. That has actually fixed the problem as you can see below.
Code:
<?php
define("america","<form><input name='5' type='radio' value='5'>$5<br/>
<input name='5' type='radio' value='10'>$10<br/>
<input name='5' type='radio' value='20'>$20<br/>
<p>Other: <input name='5' size='50' type='text'></p>
</form>");
?>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|