You know, that code can't possibly work if the HTML page every shows more than one row (more than one id).
Clicking on ANY of the submit buttons (the value="Update" buttons) will submit *ALL* the data from *ALL* the rows, and PHP is not equipped to handle that.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.