<html>
<head>
<title>A + B</title>
</head>
<body>
<form action="a_plus_b.php" method="POST">
A: <input type="text" name="A"><br>
B: <input type="text" name="B"><br>
<input type="submit"><input type="reset">
</form>
</body>
</html>
<?php
# 3个用来接收的全局变量:$_POST, $_GET, $_REQUEST
$a=$_POST["A"];
$b=$_POST["B"];
$c=$a+$b;
echo $a.' + '.$b." = $c";
?>