title: How to retrieve multiple text box values from single form using PHP/Codeigniter?
body: <p>I am working on an eCommerce website.I have a product page where i have single form to add multiple product quantities at the same time using the button .
  On my products page,within my single form i am sending individual product values to next page like these using the loop:</p>
  
  <pre><code>&lt;?
  $query_data=$this-&gt;db-&gt;get('products');
  foreach($query_data-&gt;result() as $product)
   {
  ?&gt;
    &lt;input name="productname[]" value="&lt;?=$product-&gt;Name?&gt;" type="hidden" /&gt;
   &lt;input type = "hidden" id = "product_id" name = "product_id[]" value = "&lt;?=$product-&gt;Code?&gt;" /&gt;
    &lt;input name="num_pallets[]" id="num_pallets" value="&lt;?=$pallet?&gt;" type="hidden" /&gt;
   &lt;input type = "hidden" id = "num_packs" name = "num_packs[]" value = "&lt;?=$packet?&gt;" /&gt;
   &lt;input type="text" name="quantity[]" id="quantity" size="2" /&gt;
  &lt;input type = "hidden" id = "product_price" name = "product_price" value = "&lt;?=$number?&gt;" /&gt;    
  &lt;? 
   }
   ?&gt;
  </code></pre>
  
  <p>Where :</p>
  
  <p>1) the "quantity" field is the quantity of the product a customer will order. </p>
  
  <p>2) the "num_pallets" field is the pallet quantity of the product a product has in the database. </p>
  
  <p>3) the "num_packs" field is the pack quantity of the product a product has in the database. </p>
  
  <p>Now,i want to retrieve the corresponding values on shopping cart page so that i could perform calculations accordingly.</p>
  
  <p>The other problem i have is that when i submit my form,it submits all the values INCLUDING THE products' values of those I dont enter quantity in the text boxes.</p>
  
  <p><strong>MY Question:</strong></p>
  
  <p>How can i loop through the products (I enter the "quantity" in text boxes) on my page so that it could give me the corresponding values of the ordered products ONLY i.e if i fill in the quantity text box of product(11760) then i want to process values of 11760 ,not other products. </p>
  
  <p>How can i retrieve the corresponding values of 1 or more ordered product only ??Thanks </p>