[eluser]Gukkie[/eluser]
Hi, i am having a problem with a registration page.
It seems this problem only happens for MAC OS X users using any browser.
After filling up a registration page and clicking on submit, the captcha field always throws an "Invalid Captcha" error which means the captcha validation is not going through or failing.
Why is this happening?
This works fine for all users not using mac os x.
Is there a way to fix this problem?
My Validation code:
Code:
function validate_captcha_model()
{
//checking input
$expiration = time()-3600;
$sql = "SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?";
$binds = array($_POST['captcha'], $this->input->ip_address(), $expiration);
$query = $this->db->query($sql, $binds);
$row = $query->row();
if($row->count > 0)
{
return true;
}
return false;
}
Cheers!