Welcome Guest, Not a member yet? Register   Sign In
Captcha error word_length
#1

I am testing Captcha and my code is like this:

Code:
$this->load->helper('captcha');
$vals = array(
       'word'          => mt_rand (100000,1000000),
       'img_path'      => './public/captcha/',
       'img_url'       => base_url().'public/captcha/'
);
$cap = create_captcha($vals);
echo $cap['image'];die();

This works OK but if the 'word' line is commented out I get a php error Undefined variable: word_length
although the User Guide says 'If a word is not supplied, the function will generate a random ASCII string.' Is this a bug or have I made a mistake in the coding?
Reply


Messages In This Thread
Captcha error word_length - by msheath - 06-26-2016, 02:24 PM
RE: Captcha error word_length - by BabalooAye - 07-08-2016, 05:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB