Welcome Guest, Not a member yet? Register   Sign In
Captcha not working on Mac OS x
#1

[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!
#2

[eluser]vbsaltydog[/eluser]
Enable the profiler.
#3

[eluser]Gukkie[/eluser]
Alright i have got it working, it seems that only one mac os x was giving the problem, havent figured out wats causing it Smile
#4

[eluser]vbsaltydog[/eluser]
The client OS/browser has NOTHING to do with the server side logic so the only thing you need to check is the post data received by the server.
#5

[eluser]Gukkie[/eluser]
It works on a different mac os x, im guessing something isn't working right on the one thats throwing the error.

thanks buddy Smile
#6

[eluser]vbsaltydog[/eluser]
Glad to help.




Theme © iAndrew 2016 - Forum software by © MyBB