How to get the value of dynamically created radio button.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vidhya raman
    New Member
    • Jan 2011
    • 5

    How to get the value of dynamically created radio button.

    I have dynamically created radio buttons.how to get the value of these buttons using post.
    $i=1;
    <input type="radio" name="qtn-$i" value="yes">
    $i++;
    how to get this value using post method.
  • HaLo2FrEeEk
    Contributor
    • Feb 2007
    • 404

    #2
    More context on exactly why the radio is dynamically created might help. If you're populating from a database then check the database on the page that handles the POST data. If you want to create a variable number of radio buttons with the same base name, just add [] or [$i] to the end of the name.

    Ultimately I think you're going to need to post more code so that we can see exactly what you're trying to accomplish.

    Comment

    • vidhya raman
      New Member
      • Jan 2011
      • 5

      #3
      I have used [$i] and solved the problem.Thank U.

      Comment

      • HaLo2FrEeEk
        Contributor
        • Feb 2007
        • 404

        #4
        You are welcome. Please be sure to mark the answer as the best answer for future readers.

        Comment

        Working...