23.11.2006, 17:31
Hab nen kleines Problem mit nem Captcha, er sagt immer Sicherheitscode Falsch obwohl er richtig ist :S
captcha.php
Formular
Auswertung
Woran könnte es liegen?
captcha.php
PHP-Code:
<?php
$text = rand(10000, 99999);
session_start();
$SESSION['text'] = $text;
header("Content-type: image/png");
$im = imagecreatetruecolor(70,25);
$bg_color = ImageColorAllocate($im, 0, 0, 0);
$font_color = ImageColorAllocate($im, 255, 255, 255);
imagestring ($im, 5, 20, 7, $text, $font_color);
imageline($im, 0, 0, 30, 30, $font_color);
imageline($im, 60, 0, 0, 60, $font_color);
imagepng($im);
?>Formular
PHP-Code:
<img src="captcha.php"><input type="text" name="eingegebenerCaptcha" size="5" maxlength="25">
Auswertung
PHP-Code:
if($eingegebenerCaptcha != $SESSION['text'] or !$eingegebenerCaptcha)
{
eval("die(\"".$tpl->get("gb_err7")."\");");
}
Woran könnte es liegen?


