Hi, I am using CodeIgniter on my website and I have a form which allows users to sign up on my website. They must enter a captcha code when signing up. The problem is that something went wrong and even if the captcha code is entered correctly users get "Captcha Code invalid". Can someone tell me if there's anything wrong with these lines? $string = trim(strtoupper(base64_decode(get_cookie('string')))); $detalii['captcha'] = trim(strtoupper($this->input->post('captcha'))); $cuc = $this->input->post('phonenumber'); if($string!=$detalii['captcha']) $data['mesaj'] = "Captcha code invalid."; Code (markup): Thanks!
Have you checked the content/value of the $string and $detalii['captcha'] variables? Was the cookie 'string' set?