Welcome Guest, Not a member yet? Register   Sign In
Captcha in CI?
#11

[eluser]Nonox[/eluser]
Don't worry, is not necessary delete the captcha's images, revising the captcha_pi.php I discovered part of the code who delete the old files, this code is called "Remove old images"...

Sorry and thanks for your time.
#12

[eluser]hugslife[/eluser]
Code:
CREATE TABLE captcha (
    captcha_id bigint(13) unsigned NOT NULL auto_increment,
    captcha_time int(10) unsigned NOT NULL,
    ip_address varchar(16) default ‘0’ NOT NULL,
    word varchar(20) NOT NULL,
    PRIMARY KEY (captcha_id),
    KEY (word)
  )

...

  // Then see if a captcha exists:
  $sql = “SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND date > ?”;
  $binds = array($_POST[‘captcha’], $this->input->ip_address(), $expiration);
  $query = $this->db->query($sql, $binds);
  $row = $query->row();

just a caveat about captcha_pi docs. the above will throw a mysql error because there is no "date" field in the suggested captcha table.




Theme © iAndrew 2016 - Forum software by © MyBB