I've run into this problem twice now, I'll try to be brief:
I want a table where each entry has similar actions. Delete row from table, move row up, move row down. I'm having trouble being able to manipulate the data from any of the keys being pressed in what would appear to be an aesthetically pleasing or even directly functional way.
The problem may be how I'm naming them:
<tr><td>Example Row 1</td> <td><input name="delete_1" value="delete"></td></tr>
<tr><td>Example Row 2</td> <td><input name="delete_2" value="delete"></td></tr>
<tr><td>Example Row 3</td> <td><input name="delete_3" value="delete"></td></tr>
<tr><td>Example Row 4</td> <td><input name="delete_4" value="delete"></td></tr>
I want my PHP script to see which row I mean to delete when I click on Delete row 4 for example.
I believe it would be incredibly simple to make the value the id of the row and use that to manipulate the data, but then the text changes in the html element.
I've had some bizarre ideas to work around what I see as this problem, using while loops to check if $POST['delete . $incremented_value ] is set, etc but it is horribly overcomplicated.
Apologies if I'm asking a ridiculous question or being blind to the solution, thank you for reading.