Welcome Guest, Not a member yet? Register   Sign In
Captcha. 2 captchas???
#1

[eluser]ThijssjihT[/eluser]
Every time a page with a captcha is visited, 2 captchas are created. I get 2 images in the folder, and 2 database rows. I use the standard captcha helper.
It's not a very big problem, becouse everything works, but it isn't very nice.

controller:
Code:
$attr = array('img_path' => './inc/captcha/', 'img_url' => base_url() . 'inc/captcha/');
$cap = create_captcha($attr);
$attr = array('captcha_time' => $cap['time'], 'ip_address' => $this->input->ip_address(), 'word' => $cap['word']);
$query = $this->db->insert_string('captcha', $attr);
$this->db->query($query);
$data['captcha'] = $cap['image'];

the $data variable is send to the view

I can't see what's wrong here.




Theme © iAndrew 2016 - Forum software by © MyBB