Something like this:
button-page:
<html><head><title></title></head>
<body>
<form name="blah" method="post" action="script.php">
<input type="button" name="check_me" value="press me">
</form>
</body>
</html>
script.php
<?php
if( IsSet( $check_me ) && $check_me=="press me")
do_function();
else
echo "Sorry";
function do_function()
{
echo "blah";
}
?>
do you mean something like that?