[eluser]ShoeLace1291[/eluser]
I've never used the captcha helper in 2.0 and I'm having quite a bit of trouble with it. When I print the image with the variable, nothing is displayed. I'm using the template parser class to display a form and the image is stored in a variable. The variable name itself doesn't display on the template, so I'm figuring it has something to do with my settings for the image. Here it is:
Code:
$images = array('captcha001.jpg', 'captcha002.jpg', 'captcha003.jpg', 'captcha004.jpg', 'captcha005.jpg');
$vals = array(
'word' => random_string('alnum', 5),
'img_path' => 'images/captcha/'.random_element($images),
'img_url' => 'http://localhost/lensereflex/captcha/',
'img_width' => '150',
'img_height' => 30,
'expiration' => 7200
);
$captcha = create_captcha($vals);
$data = array(
'FORM_OPEN' => form_open(),
'VALIDATION_ERRORS' => validation_errors(),
'CAPTCHA_IMAGE' => $captcha['image']
);
$this->parser->parse('form_register.tpl', $data);