In PHP you can check the $POST array to see which button was clicked, and which fields were submitted along with the form.
<form...>
...
<input type="submit" name="submit">
</form>
if( isset( $_POST['submit'] ))
{
echo 'Submit button was clicked';
}
It's not quite as simple as 'the submit button was clicked' though. As far as PHP is concerned, it read an HTTP POST request with a set of parameters, one of which was named submit.
It seems to me that you are thinking in terms of event driven programming, which is a feature of Javascript . There is a PHP framework called Prado which uses this technique.