test.php页面
判断该页是否提交,如果提交了,就按照正常的接受数据来就行了。
<?php
if($_POST){
$words = $_POST["words"];
if ($words) {
echo "收到";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<form action="test.php" method="post">
<input type="text" name="words">
<input type="submit" name="" value="提交">
</form>
</body>
</html>