title: Dynamic naming of radio buttons
body: <p>I have "n" number of rows being returned by a sql statement.  Works great.  For every row returned, I would like the user to pick an option (either option 'a' or option 'b')</p>
  
  <p>As standard practice a while loop is used to iterate through each row, and I attempt to name my options by the row number.  However, I run into problems when I attempt to get the value of the radio button the user has selected.</p>
  
  <p>I can't seem to dynamically get the value of the radio button named 1 in the first loop (or any loop with it's appropriate name) of the where clause.</p>
  
  <p>Code snippet here:</p>
  
  <pre><code>$counter = 1;
  
  while($row = mysql_fetch_array($result))
  {
  
    echo "&lt;form action='updatepics.php' method='post'&gt;";
    echo "&lt;input type='radio' name='m" . $counter . "' value=  ". $row['f_id'] ."&gt; " . $row['Favorite'];
    echo "&lt;input type='hidden' name='game' value=" . $counter . "&gt;";
    echo " vs " . $row['Underdog'] ." ";
    echo "&lt;input type='radio' name='m" . $counter . "' value=  ". $row['d_id'] ."&gt; ";
  
    echo "&lt;br&gt;";
    echo "&lt;input type='hidden' name='choice' value=" . $_GET["m" . $counter] . " &gt;";
    echo "&lt;input type='submit' value='Make Choice'&gt;";
    echo "&lt;/form&gt;";
    $counter ++;
  }
  </code></pre>
  
  <p>updatepics.php:</p>
  
  <pre><code>Game 
  &lt;?php
   echo $_POST['game'];
   echo " " . $_POST['player'] . " picks: ";
   echo " " . $_POST['choice'] ;
   ?&gt;
  </code></pre>
  
  <p>output of updatepics.php...<br>
        Game 1 granny picks:</p>
  
  <p>Notice 'choice' is null</p>