Here's a snip of table code found within a form. The rows are "identical". The inputs are all named alike. The submit buttons are all named alike. Each row contains <input>
elements and each row has one submit button.
<tr>
<td><input type='text' name='first' value='mark'></td>
<td><td><button type='submit'name='editbutton' value='1'>Edit</button></td>
</tr>
<tr>
<td><input type='text' name='first' value='luke'></td>
<td><td><button type='submit'name='editbutton' value='2'>Edit</button></td>
</tr>
<tr>
<td><input type='text' name='first' value='john'></td>
<td><td><button type='submit'name='editbutton' value='3'>Edit</button></td>
</tr>
When a button is pressed, $_POST contains the data in the same row as the submit button. It works in ie and ff. Is this how this is supposed to work? I've use javascript/jQuery with id's to collect specific rows of data in the past, but if this submit construct, which does work, is correct, I'd use it instead.
Thank you.