html发送
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form POST</title>
</head>
<body>
<form action="02_POST.php" method="post">
a:<input type="text" name="a"><br>
b:<input type="text" name="b"><br>
<input type="submit" value="提交">
</form>
</body>
</html>
PHP接收
<?php
//
if ($_POST['a']&&$_POST['b']){
echo $_POST['a']+$_POST['b'];
}else{
echo "请输入参数";
}