function multiply ($a,$b){ return $a * $b; } if(isset($_POST['x']) && isset($_POST['y'])){ echo multiply($_POST['x'],$_POST['y']); exit; } ?>