Hi all.
For 3 days I have searched the web to find out how it works, unfortunatelly with no success.
I need to compare the encrypted haptcha code with my text, both of them sent by a form.
if(!isset($_POST['my_text'])) {
$view = new Zend_View();
$captcha = new Zend_Captcha_Figlet(array(
'name' => 'foo',
'wordLen' => 6,
'timeout' => 300,
));
$captcha_code = $captcha->generate();
$captcha_image = $captcha->render($view);
echo '<form method="post" action="">';
echo $captcha_image;
echo '<input type="text" name="my_text" />';
echo '<input type="hidden" name="captcha_code" value="'.$captcha_code.'" />';
echo '<input type="submit" value="Submit" />';
echo '</form>';
} else {
echo $_POST['my_text'].'<br />';
echo $_POST['captcha_code'].'<br />';
}
Please help how can I compare $_POST['my_text'] and $_POST['captcha_code'].
Thank you.