<?
$a= 50;
$c = 5;
$res = "Результат: ";
echo $res;
if (isset($_POST['sub']))
{
$result = $a - $c;
echo $result;
}
?>
<form action="index.php" method="post" name="form">
<input type="submit" name="sub" value="Вычеслить">
В общем то работает, но при нажатии на кнопку вычисляет только один раз, последующие разы ни к чему не приводят.