You can check for the value of the submit button, e.g.:
<form action='' method='post'>
<p>
<input type='submit' name='submit' value='One' />
<input type='submit' name='submit' value='Two' />
<input type='submit' name='submit' value='Three' />
</p>
</form>
<?php
if(!empty($_POST['submit']))
{
switch($_POST['submit'])
{
case 'One':
echo "Thanks for clicking 'One.'";
break;
case 'Two':
echo "Why did you click 'Two'?";
break;
case 'Three':
echo "I can't believe you clicked 'Three.'";
break;
default:
echo "How did you do that?";
}
}
?>