Welcome Guest, Not a member yet? Register   Sign In
Captcha helper problem
#11

[eluser]SaSa[/eluser]
Hello
I display all the code. Where is the problem, please?
#12

[eluser]mi6crazyheart[/eluser]
U'r MODEL function is really confusing. U r trying to do a lot of things in one single MODEL function with having multiple numbers "return" statements.

Any way, about u'r main prob of captcha validation is returning always TRUE , for that i want to say.. plz clearly write the captcha making code at one place...

EX: Here is the captcha making code which u can directly use in VIEW file...
Code:
$vals = array(
'word'        => '',
'img_path'    => './captcha/',
'img_url'    => base_url().'captcha/',
'font_path'    => './path/to/fonts/texb.ttf',
'img_width'    => '150',
'img_height'    => 30,
'expiration'    => 7200
);

$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);

echo $cap['image'];


Try it...
#13

[eluser]SaSa[/eluser]
I tried but it did not work.
The problem is not on create captcha. It is the problem validation captcha which is always true.
Do you have another idea to solve this problem?
#14

[eluser]SaSa[/eluser]
help?
#15

[eluser]vhen[/eluser]
did you run/test your query in a query browser or in phpmyadmin first if it really returns what you expected?
#16

[eluser]SaSa[/eluser]
yes, other query, worked but this not worked and is always true.
#17

[eluser]vhen[/eluser]
maybe not all captcha's are deleted when you run the delete query and there are still captchas left..so when you try to retrieve the captchas the count is not 0. please check all your queries.




Theme © iAndrew 2016 - Forum software by © MyBB