Ok,
I tested your code and it works on my server ... I can't see any error ... just to make sure, add a line that prints whatever text to make sure that web server uses the right script (sounds stupid, but that's one step in solving the problem). Please check the target of the form if it points to the script or use $_SERVER['PHP_SELF'] as the target of the form.
To avoid warnings you can add some code to check if the form has been submitted at all:
<?php
if (isset($_POST['func'])) {
if($_POST['func'] == "+"){
$result = $_POST['number1'] + $_POST['number2'];
}
if ($_POST['func'] == "-"){
$result = $_POST['number1'] - $_POST['number2'];
}
if($_POST['func'] == "*"){
$result = $_POST['number1'] * $_POST['number2'];
}
if($_POST['func'] == "/"){
$result = $_POST['number1'] / $_POST['number2'];
}
}
?>
Thomas