what is this error? How do I fix it?
i use of codeigniter.
A Database Error Occurred
Error Number: 1048
Column 'captcha_time' cannot be null
INSERT INTO `captcha` (`captcha_time`, `ip_address`, `word`) VALUES (NULL, '31.57.141.7', NULL)
Filename: /home/324/public_html/123/models/login_model.php
Line Number: 79
line 79:
function create_captcha()
{
$vals = array(
'img_path' => './captcha/',
'img_url' => 'captcha/',
);
$cap = create_captcha($vals);
$data = array(
'captcha_time' => $cap['time'],
'ip_address' => $this->input->ip_address(),
'word' => $cap['word']
);
$query = $this->db->insert_string('captcha', $data);
$this->db->query($query); // this line 79
}
You're getting this error because the folder "/captcha" is either not on your server or has the wrong permissions set.
if the image path doesn't exist, or isn't writeable the create_captcha() function returns false, have a look in the captcha helper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With