[eluser]anggie[/eluser]
I am new to CodeIgniter...
I think I can call a plugin within my library. Am I right?
But I don't know why I cannot get a return data from it?
This is my function..
Code:
function setChaptcha()
{
$vals = array(
'img_path' => './asset/captcha/',
'img_url' => base_url().'/asset/captcha/',
'expiration' => 3600,// one hour
'font_path' => './system/fonts/georgia.ttf',
'img_width' => '150',
'word' => random_string('numeric', 6),
);
$cap = create_captcha($vals);
$capdb = array(
'captcha_id' => '',
'captcha_time' => $cap['time'],
'ip_address' => $this->SA->input->ip_address(),
'word' => $cap['word']
);
$query = $this->SA->db->insert_string('captcha', $capdb);
$this->SA->db->query($query);
$data['cap'] = $cap;
return $data;
}
The error appear like this...
Code:
A Database Error Occurred
Error Number: 1048
Column 'captcha_time' cannot be null
INSERT INTO captcha (captcha_id, captcha_time, ip_address, word) VALUES ('', NULL, '192.168.10.207', NULL)
I did NOT modify the plugin before...
Could you give me some helps?
Thanks...