Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Radio Buttons Not Being Passed

    I have radio buttons that are not being sent when selected, they either not being passed, or not echoing. Any ideas?

    This get's passed and echos just fine:
    <input name="abc" type="radio" value="50" />50
    <input name="abc" type="radio" value="60 " />60

    PHP Code:
    <?php echo $_POST['abc'];?>
    But this one doesn't get passed:

    <input name="do" type="radio" value="Enclosed"/>Enclosed
    <input name="do" type="radio" value="Open" />Open
    <input name="do" type="radio" value="Both" /> Both


    PHP Code:
    <?php echo $_POST['do'];?>

  • #2
    Regular Coder
    Join Date
    May 2009
    Location
    Moore, OK
    Posts
    282
    Thanks
    11
    Thanked 41 Times in 41 Posts
    Hmm looks good. Are you sure there is nothing else causing it?

  • #3
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    try changing the name of the radio buttons from do to something else.
    maybe doSomething
    Software and cathedrals are much the same - first we build them, then we pray.

  • Users who have thanked ckeyrouz for this post:

    GenVic (09-17-2009)

  • #4
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solution for Radio Buttons Not Being Passed

    Hi GenVic,

    The coding for the radio button and tags are right.
    Please check in the form that you mentioned method="post".
    If not please use the method="post".
    And also check that you opened a form tag and closed it.
    And check it.
    May be this will help you.

    Thanks
    Last edited by JohnDubya; 09-22-2009 at 05:21 PM. Reason: Removed advertisement links

  • #5
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ckeyrouz View Post
    try changing the name of the radio buttons from do to something else.
    maybe doSomething
    Yeah, that did it, thanks. I think it may have been some hidden characters within the editor, weird.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •