Welcome Guest, Not a member yet? Register   Sign In
The Securimage library - an open-source free PHP CAPTCHA script
#7

[eluser]ShoeLace1291[/eluser]
Is there a function that displays only the code? I would like to use this in form validation so there would be a hidden input with the actual text code in it. Then I would use a rule like 'required|matches[actualcode]' for the security text input.

Also, mine is only displaying the image, not the character string. Here's my code:

Code:
function index(){
    
        $this->template->head();
        
        if($this->form_validation->run('register') == FALSE){
        
            $data = array(
                          'FORM_OPEN' => form_open('register'),
                          'VALIDATION_ERRORS' => validation_errors(),
                          'SECURITY_IMAGE' => img('image/securimage', TRUE),
                          'SECURITY_CODE' => $this->securimage->getCode()
                          );
            
            $this->parser->parse('form_register.tpl', $data);
            
        }
        
        $this->template->foot();
        
    }


Messages In This Thread
The Securimage library - an open-source free PHP CAPTCHA script - by El Forum - 10-14-2010, 02:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB