Its for, The forums should only registered users that have this answer, because its are closed forum.Kevin Clark wrote:I don't quite understand what the reasoning is for it.
The first person who signs up would have a choice of guessing one of, say, 20 names and therefore has a good chance of choosing an acceptable answer.
If those acceptable answers then start dropping off the list, the 20th person to sign up could be there for an hour trying one name after another until they hit the one that's left. OR if you keep adding more names to the list, you have to keep thinking up more and more unique ones, which again people won't necessarily know which ones are available or not.
What are you trying to achieve with this?
Code: Select all
/**
* The actual validation
*/
function check_answer()
{
global $db;
$answer = ($this->question_strict) ? utf8_normalize_nfc(request_var('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc(request_var('qa_answer', '', true)));
$sql = 'SELECT answer_text
FROM ' . CAPTCHA_ANSWERS_TABLE . '
WHERE question_id = ' . (int) $this->question;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$solution = ($this->question_strict) ? $row['answer_text'] : utf8_clean_string($row['answer_text']);
if ($solution === $answer)
{
$this->solved = true;
break;
}
}
$db->sql_freeresult($result);
return $this->solved;
}