title: how to loop through a set of GET values in php
body: <p>I'm making a simple online store like program. What can you suggest that I would do so that I can loop through the inputs I've made in my program.</p>
  
  <p>I'm still using get so that I could see how the data looks like, I'll change it to post later.
  This is what the url looks like, when I commit the buying of all the products added in the cart:
  <a href="http://localhost/pos/php/checkout.php?ids=2;&amp;qoh=12;&amp;qbuys=&amp;ids=6;&amp;qoh=2304;&amp;qbuys=304&amp;ids=4;&amp;qoh=699;&amp;qbuys=99" rel="nofollow">http://localhost/pos/php/checkout.php?ids=2;&amp;qoh=12;&amp;qbuys=&amp;ids=6;&amp;qoh=2304;&amp;qbuys=304&amp;ids=4;&amp;qoh=699;&amp;qbuys=99</a></p>
  
  <p>This is the code that I'm using to commit only one product, it doesn't work when I had something like in the above url:</p>
  
  <pre><code>&lt;?php
  
  $id=$_GET['ids'];
  $qtyhnd=$_GET['qoh'];
  $qtytbuy=$_GET['qbuys'];
  $left=$qtyhnd-$qtytbuy;
  
  
  
  if($qtyhnd&gt;=$qtytbuy){
  $update=query_database("UPDATE prod_table SET  QTYHAND='$left' WHERE PID='$id'", "onstor", $link);
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>Please comment if you need more details,thanks</p>