 <p>You have</p> <pre><code>&lt;input type="hidden" value="1" name="id"&gt; &lt;input type="hidden" value="2" name="id"&gt; </code></pre> <p>etc.</p> <p>You're going to only get number 5 because it is the last one, and is overwriting the one before it.</p> <p>Same with the input texts, the <code>name</code> attribute should be different.</p> <p>Do a <code>var_dump($_POST);</code> to see all that is being POST'ed. </p>