1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how do you get the value of a selected radio button

Discussion in 'PHP' started by lost, Dec 15, 2005.

  1. #1
    when a radio button is selected, i need to return the value, how do i do that?
     
    lost, Dec 15, 2005 IP
  2. kirpy

    kirpy Member

    Messages:
    61
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Give a name to <selected> then write down the values on selection items.

    What you mean with returning value?
     
    kirpy, Dec 15, 2005 IP
  3. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #3
    if you have something like this

    
    <input type="radio" value="1'"name="radbut">Yes
    <input type="radio" value="2" name="radbut">No
    
    HTML:
    the query will be : page.html?radbut=1 or page.html?radbut=2

    so in PHP just check the $_GET["radbut"] value (or $_POST)
     
    frankm, Dec 15, 2005 IP