title: PHP, Radio Buttons return on, not value
body: <p>Sorry if this is a really simple question, I am just learning php, but I've been writing a script that can create quizzes, and right now html hates me. When I click a radio button and submit my form the result is always that the button is on, not the value I assign it. Here is the excerpt of my code:</p>
  
  <pre><code>echo '&lt;form action="index.php" method="get"&gt;';
  for ($i=0; $i&lt;$_SESSION["fsize"];$i++)
  {
      echo 'Type of Answer for Question ' . $i + 1 . ": &lt;br&gt; ";
      echo '&lt;input type="radio" name="f' . $i . ' value="radio"&gt;Radio Buttons &lt;br&gt;';
      echo '&lt;input type="radio" name="f' . $i . ' value="text"&gt;Text area &lt;br&gt;';
      echo '&lt;input type="radio" name="f' . $i . ' value="Checkboxes"&gt;Checkboxes &lt;br&gt;';
  </code></pre>
  
  <p>The html of my page, which is very incomplete, generated by my php is this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action="index.php" method="post"&gt;
  Number of questions: 
  &lt;input type="number" name="fsize"&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  &lt;form action="index.php" method="get"&gt; 
  1: 
  &lt;br&gt; 
  &lt;input type="radio" name="f0 value="radio"&gt;
  Radio Buttons 
  &lt;br&gt; 
  &lt;input type="radio" name="f0 value="text"&gt; 
  Text area  
  &lt;br&gt; 
  &lt;input type="radio" name="f0 value="Checkboxes"&gt; 
  Checkboxes  
  &lt;br&gt; 
  1:  
  &lt;br&gt;  
  &lt;input type="radio" name="f1 value="radio"&gt; 
  Radio Buttons  
  &lt;br&gt; 
  &lt;input type="radio" name="f1 value="text"&gt; 
  Text area  
  &lt;br&gt; 
  &lt;input type="radio" name="f1 value="Checkboxes"&gt; 
  Checkboxes  
  &lt;br&gt; 
  1:  
  &lt;br&gt;  
  &lt;input type="radio" name="f2 value="radio"&gt; 
  Radio Buttons  
  &lt;br&gt; 
  &lt;input type="radio" name="f2 value="text"&gt; 
  Text area  
  &lt;br&gt; 
  &lt;input type="radio" name="f2 value="Checkboxes"&gt; 
  Checkboxes  
  &lt;br&gt; 
  &lt;input type="submit"&gt; 
  \n  
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I specifically switched to get rather than post so I could see my results, and this is the important part of my url <code>/index.php?f0+value%3D=on&amp;f1+value%3D=on&amp;f2+value%3D=on</code></p>
  
  <p>Does anyone know how I can get it to submit properly? and if you want to see the full php script here it is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;?php
  session_start();
  echo '&lt;form action="index.php" method="post"&gt; Number of questions: &lt;input type="number"
  name="fsize"&gt;';
  echo '&lt;input type="submit"&gt;&lt;/form&gt;';
  if (isset($_POST["fsize"]))
  {
  $_SESSION["fsize"] = $_POST["fsize"];
  }
  if (isset($_SESSION["fsize"]))
  {
  echo '&lt;form action="index.php" method="get"&gt;';
  for ($i=0; $i&lt;$_SESSION["fsize"];$i++)
  {
      echo 'Type of Answer for Question ' . $i + 1 . ": &lt;br&gt; ";
      echo '&lt;input type="radio" name="f' . $i . ' value="radio"&gt;Radio Buttons &lt;br&gt;';
      echo '&lt;input type="radio" name="f' . $i . ' value="text"&gt;Text area &lt;br&gt;';
      echo '&lt;input type="radio" name="f' . $i . ' value="Checkboxes"&gt;Checkboxes &lt;br&gt;';
      if (isset($_GET["f" . $i]))
      {
          $_SESSION["f".$i] = $_GET["f".$i];
          echo "I exist!";
      }
      if (isset($_SESSION["f".$i]))
      {
          echo '&lt;textarea rows="4" cols="50"&gt; What is the question? &lt;/textarea&gt;';
          switch($_SESSION["f".$i])
          {
              case("radio"):
                  echo "you chose a radio button!";
                  break;
              case("text"):
                  echo "You chose a text area!";
                  break;
              case("Checkboxes"):
                  echo "You chose checkboxes!";
                  break;
              default:
                  break;
          }
      }
      else if (isset($_GET["f".$i]))
      {
          echo '&lt;textarea rows="4" cols="50"&gt; What is the question? &lt;/textarea&gt;';
          switch($_GET["f".$i])
          {
              case("radio"):
                  echo "you chose a radio button!";
                  break;
              case("text"):
                  echo "You chose a text area!";
                  break;
              case("Checkboxes"):
                  echo "You chose checkboxes!";
                  break;
              default:
                  break;
          }
      }
  }
  echo '&lt;input type="submit"&gt; &lt;/form&gt;';
  }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have a few other problems with it too I know, but this is the most infuriating.
  Sorry about the length, Hovestar.</p>