php – if!isset多个OR条件
发布时间:2020-12-13 16:37:32 所属栏目:PHP教程 来源:网络整理
导读:我不能让这个工作为我的生活,这是 PHP. ?php if (!isset($_POST['ign']) || ($_POST['email'])) { echo "Please enter all of the values!"; } else { echo "Thanks," . $_POST['ign'] . ",you will recieve an email when the site is complete!"; } ? 我也
我不能让这个工作为我的生活,这是
PHP.
<?php if (!isset($_POST['ign']) || ($_POST['email'])) { echo "Please enter all of the values!"; } else { echo "Thanks," . $_POST['ign'] . ",you will recieve an email when the site is complete!"; } ?> 我也试过使用!isset两次. isset() 接受的不仅仅是一个参数,所以只需传递很多变量,你需要检查:
<?php if (!isset($_POST['ign'],$_POST['email']) { // Rest of the code here } ?> 您也可以使用 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |