Hi guys!
I am working on registration form, where user need to put CAPTCHA image base.
(where user can put some random text string five character long)
1 -However during the registration form the text image doesn’t not appear.
2 –i wrote captcha file , (for text image create)
3 – found some error on captcha file. (With the help of error.php)
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/mardan/public_html/user-registration/lib/error.php:2) in /home/mardan/public_html/user-registration/img/captcha.php on line 19
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mardan/public_html/user-registration/lib/error.php:2) in /home/mardan/public_html/user-registration/img/captcha.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /home/mardan/public_html/user-registration/lib/error.php:2) in /home/mardan/public_html/user-registration/img/captcha.php on line 20
Warning: Cannot modify header information - headers already sent by (output started at /home/mardan/public_html/user-registration/lib/error.php:2) in /home/mardan/public_html/user-registration/img/captcha.php on line 42
‰PNG IHDRA èzÂB PLTE3fÿÿÿÿï@nÂGIDAT ™c ÈÏH>øà ˆÅ&“–l8 Ì’Ë1“怳ÀêØ¤sŒ¬ ,ÃÛ u’o7Hó€Y o>ÁXÏ ¦M¾ 1™TѾ •u $¢IEND®B
‚
4 - This is my function file which i use as include’…/lib/function.php’;
<?php
//return a string of random text of a desired length
function random_text($count, $rm_similar = false )
{
//create list of characters
$chars = array_flip(array_merge(range(0,9), range(‘A’,‘Z’)));
//remove similar looking characters that might cause confusion
if ($rm_similar)
{
unset ($chars[0], $chars[1],$chars[2],$chars[5],$chars[8],$chars[‘B’],$chars[‘I’],$chars[‘o’],$chars[‘Q’],$chars[‘S’],$chars[‘U’],$chars[‘V’],$chars[‘Z’]);
}
//generate the string of random text
for($i = 0, $text = ‘’ ; $i< $count; $i++)
{
$text.= array_rand($chars);
}
return $text;
}
?>
Any idea ,what going wrong.
Please
Thanks