比如我写好的POST提交例子,验证邮箱和值是否未空?include("check.php");$check=newVerifyAction();if(?){echo'提交成功!';}else{echo'填写不对重填写';}验证类check.php
2 回答
慕盖茨4494581
TA贡献1850条经验 获得超11个赞
include("check.php");if($_SERVER['REQUEST_METHOD']=='POST'){if(!VerifyAction::isEmpty($_POST['name'])){die("用户名不能为空");}elseif(!VerifyAction::isEmail($_POST['email'])){die("无效邮箱账号");}echo"验证通过";}
添加回答
举报
0/150
提交
取消