PHP:检查是否有任何已发布的 var 为空 - 表单:所有必填字段
有没有更简单的函数,像这样:
if (isset($_POST['Submit'])) {
if ($_POST['login'] == "" || $_POST['password'] == "" || $_POST['confirm'] == "" || $_POST['name'] == "" || $_POST['phone'] == "" || $_POST['email'] == "") {
echo "error: all fields are required";
} else {
echo "proceed...";
}
}