hi, in osbanditi is 5 images, and you must click on 1 image, i found code:
Citaatonclick="forms[0].captcha.value='<?=$codes[$x];?>';forms[0].submit();"
but the onclick not works, what javascript i must include to my new game?? please
hi, in osbanditi is 5 images, and you must click on 1 image, i found code:
Citaatonclick="forms[0].captcha.value='<?=$codes[$x];?>';forms[0].submit();"
but the onclick not works, what javascript i must include to my new game?? please
Hey Thomash,
Welcome back here. Could you post your whole sourcecode from your captcha?
there is:
$code = str_replace(" ", "",$code);
if($_POST['captcha'] != "" && $_POST['captcha'] != $_SESSION['captcha']){
$error = 3;
}
function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890')
{
// Length of character list
$chars_length = (strlen($chars) - 1);
// Start our string
$string = $chars{rand(0, $chars_length)};
// Generate random string
for ($i = 1; $i < $length; $i = strlen($string))
{
// Grab a random character from our list
$r = $chars{rand(0, $chars_length)};
// Make sure the same two characters don't appear next to each other
if ($r != $string{$i - 1}) $string .= $r;
}
// Return the string
return $string;
}
$aantal_codes = 10;
$codes = array();
for($x = 0;$x < $aantal_codes;$x++)
{
$codes[$x] = md5(rand_str(60));
}
$code_id = rand(0, 4);
$juiste_code = $codes[ $code_id ];
$_SESSION['captcha'] = $juiste_code;
echo "<tr><td><b>Klik op dit plaatje:</b> <img src='images/$code_id.gif'></td></tr>";
echo"<tr><td>";
for($x = 0;$x < $aantal_codes;$x++)
{
?>
|<img src="images/<?=$x;?>.gif" border="0" style="cursor: pointer" onclick="forms[0].captcha.value='<?=$codes[$x];?>';forms[0].submit();" value="<?=$x?>">
<?php
}
?>
Toon Meer
IF I CLICK ON IMAGE, NOTHING WILL HAPPEN
Hi Thomash i also had this problem but,
if i am correct the sourcecode is ok but there is another hidden captcha.
Check your inbox i sended you pm.
it not works, its about javascript in ONCLICK, something it must be included, but i dont know
Do you have an online demo?
Heb je nog geen account? Registreer je nu en word deel van onze community!