Since PHP is a server-side only language, it cannot respond to user-events. You would need to use javascript to do that.
If however, that button is meant to process a form, you just set the action of the form to the php scriptname and it will do the rest.
e.g.
<FORM ACTION="myscript.php">