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.
Re: Multiple radio buttons selected
To create a group, give all the input elements the same name.
Re: Multiple radio buttons selected
Thanks a lot. That has actually fixed the problem as you can see below.:check:
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>");
?>