如何使用PHP来检查表单字段的特定值?如何使用PHP来检查表单字段的特定值?
需要插入值'7',否则表单字段将无效;与所有其他号码,以便无效,那么7
if(empty($_POST['captcha']))
{
$this->add_error("Did you solve the captcha?");
$ret = false;
}
作品以检查是否有任何价值 - 但我需要指定,必须是7
if(strlen($_POST['captcha']) =!7) // tried this but form completely died or disappeared
{
$this->add_error("Did you solve the captcha?");
$ret = false;
}
嘿@Jack这就是答案,男人。如果你想发布 – 2014-09-03 00:12:52