captch & sessions

#1
[eluser]Lupin[/eluser]
Hi all,
this is my first project with CI & i have encountered a weird problem.
i am using an AUTH class with captcha, i store the captcha string in a session
but for some reason the session string changes & is not cmpatible with the captcha string.

Code:
if (isset($_POST['submit'])){
    // check captch string
    if($this->session->userdata('cap_code') != $_POST['security_code'] ){
        $data['err'] = 'no match';
    }else{
    
    }

}

// Generate captch code & insert into session
$data['code'] = $this->_generateCode();
$this->session->set_userdata('cap_code',$data['code']);

any ideas?


Messages In This Thread
captch & sessions - by El Forum - 03-13-2008, 02:12 AM
captch & sessions - by El Forum - 03-14-2008, 12:43 PM
captch & sessions - by El Forum - 03-14-2008, 01:49 PM
captch & sessions - by El Forum - 03-15-2008, 02:46 AM
captch & sessions - by El Forum - 03-15-2008, 02:49 PM
captch & sessions - by El Forum - 03-25-2008, 03:11 AM
captch & sessions - by El Forum - 03-25-2008, 06:29 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.