title: how do I use value of input element in a new file (GET method)
body: <pre><code>&lt;?php
  // code that connects to database
  ?&gt;
  &lt;table&gt;
  
      &lt;form method="get" action="processorder.php"&gt;
              &lt;?php
              while (list($pizzaId, $pizzaName, $pizzaNumber, $pizzaPrice) = mysql_fetch_row($resultaat))
                      {
  
                          echo           "&lt;tr&gt;
                                      &lt;td&gt;".$pizzaName."&lt;/td&gt;
                                      &lt;td&gt;".$pizzaNumber."&lt;/td&gt;
                                      &lt;td&gt;".$pizzaPrice."&lt;/td&gt; 
                                      &lt;td&gt; &lt;input type='text' name='$pizzaId' value='$qty' size='3' /&gt;&lt;/td&gt;
                                      &lt;/tr&gt;";
                      }
              mysql_close($db);        
              ?&gt;
          &lt;input type="submit" value="Order now" /&gt;
  </code></pre>
  
  <p>I would like to display the pizzas of where there is a value in the input element. 
  the processorder.php file would look like:
  my url shows the pizzaId's with the values after the '='. So I figured I have an associative array on my hands. 
  I thought I'd put a foreach loop in my processorder.php going like </p>
  
  <pre><code>   foreach ($_GET['pizzaId'] as $pizza =&gt; $qty)    
              {
                  echo $pizza." ".$qty."&lt;br /&gt;";
              }
  </code></pre>
  
  <p>Yet, when I use the foreach loop, the error in my browser says that the argument of my foreach loop is invalid because $_GET['pizzaId'] isn't an array to begin with (I checked with is_array).
  So how do I get access to those values in my value attribute of the input element?</p>