Results 1 to 3 of 3

Thread: Multiple radio buttons selected

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    150

    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.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Multiple radio buttons selected

    To create a group, give all the input elements the same name.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    150

    Resolved 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
  •  



Click Here to Expand Forum to Full Width