title: PHP: Adding multiple products to post order form
body: <p>I'm building a sort of php shop that will allow a user to enter amounts for various products and then a form will process the order. There is no payment processing etc. What I am struggling to do is add each product to each amount to send through to the order form as a $_POST variable.  Currently my ordered items are a standard form:</p>
  
  <pre><code>&lt;input type="text" id="value" name="ordered-items[]" /&gt;
  </code></pre>
  
  <p>I thought I could add the product ID as a hidden variable, but that will just add it for every product.</p>
  
  <pre><code>&lt;input type="hidden" id="value" name="products[&lt;?php the_id(); ?&gt;]" /&gt;
  </code></pre>
  
  <p>How can I marry up the product to the order quantity and then send that to the order form for processing, this part I can do myself.</p>
  
  <p>Thanks In advance</p>