If you want to do this cross browser, without using javascript:
Use a differently named submit button for each row, where the name contains id info. Like
<input type="submit" name="id[589] value="update this row">
So long as the user either clicks that submit button, or tabs to the button tpo give it focus, and then presses enter, the browser will reliably send the name of that submit button(and only that submit button), and then you can get the id via
$id = key($_POST['id']);
But, the problem is if the user submits the form via the enter key, when the form focus is on a different type of input element, like a type=text
for example. The form will submit, but different browsers will either
1) send no name of any submit button at all,
2) or they will send the name of the first submit button to appear in the form's html source.
If you place a dummy submit button at the start of the form, and hide w/ css, then you can reliably detect this type of form submission via
isset($_POST['dummySubmit']);
You cannot perform the update, but you can output all the posted values back to the user(so that their work isn't lost), along with a message telling them they need to explicitly click a submit button, and let them try again.
Or...
you could just forgo using individual buttons, and update every record, every time, which probably isn't as bad as you think. I don't think there's generally much benefit to try to filter out what records have changed in some attempt to reduce sql queries. But if you really wanted to, maybe send an md5 hash of the row data concatenated together, and then recomput the hash upon submit and compare.