php form process - unknown input names for quantity increase / decrease
<p>Hy all, </p>

<p>I searched the stackoverflow and found no answer for my question : </p>

<p>I have an online store, and the page mycart.php will display user`s purchases like this :</p>

<pre><code>image - title - price per unit - quantity - total price
</code></pre>

<p>The products id and quantity are hold in <code>$_SESSION</code> arrays. (Is this good ? )</p>

<p>So if the user want 2 pieces of one product and 3 pieces of another product:</p>

<ol>
<li>How to generate the <code>&lt;input&gt;</code> tag (<code>&lt;input id="product1" name="product-1647"&gt;</code> ?)</li>
<li>How to iterate through that input if the attribute <code>name="product-1647"</code> is dynamic generated ?</li>
</ol>

<p>I've studied a website and they generate inputs like above.</p>

<pre><code>&lt;input type="text" id="product1" name="product-23342"&gt;
&lt;inpyt type="text" id="product2" name="product-47385"&gt;
....
etc
</code></pre>

<p>But i can't figure it out how the post-processing is done.
An advice will be great. </p>

<p>Thank you</p>
