How to use PHP to check form field for specific value?
The value '7' would need to be inserted or else the form field will be invalid; so invalid with all other numbers then 7.
if(empty($_POST['captcha']))
{
$this->add_error("Did you solve the captcha?");
$ret = false;
}
Works to check if any value -- but I need to specify, must be 7.
if(strlen($_POST['captcha']) =!7) // tried this but form completely died or disappeared
{
$this->add_error("Did you solve the captcha?");
$ret = false;
}