You just update your validate function like that -
public function validate_captcha_code() {
$cap = $this->input->post('captcha_code');
if(strtolower($cap) != strtolower($cap_word) || strtoupper($cap) != strtoupper($cap_word)) {
$this->form_validation->set_message('validate_captcha_code', 'Wrong captcha code, Please try again.');
return false;
}else{
return true;
}
}
Try this hope this works in both upper and lowercase . And let me know what's going on.