I have two submit buttons in a form. How do I determine which one was hit serverside?
You can also do it like this (I think it's very convenient if you have N inputs).
A common use case would be using different ids from a database for each button, so you could later know in the server wich row was clicked.
In the server side (PHP in this example) you can read "row" as an array to get the id.
$_POST['row']
will be an array with just one element, in the form [ id => value ]
(for example: [ '123' => 'something' ]
).
So, in order to get the clicked id, you do:
$index = key($_POST['row']);
http://php.net/manual/en/function.key.php