如何使用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