Al momento ho questa cosa, il messaggio di errore non mi compare più ma non compare nemmeno più l'immagine. Qualcuno può dirmi come ha risolto?
codice:
<?php
error_reporting(E_ALL);
require_once('captcha.class.php');
session_start();
?>
<html>
<head></head>
<body>
<?php
$captcha=new captcha();
$act=isset($_GET['act']) ? $_GET['act'] : '';
switch($act):
case('img'):
$captcha->offuscamento=3;
$captcha->genera($_GET['stringa']);
break;
case('check'):
if($_SESSION['stringa'] == $_POST['codice']){
echo 'nome: '.$_POST['nome'];
echo '
';
echo 'cognome: '.$_POST['cognome'];
} else
echo 'Il codice non corrisponde all\'immagine';
break;
default:
$stringa=$captcha->stringa_casuale();
$_SESSION['stringa']=$stringa;
echo '<form method="post" action="'.$_SERVER['PHP_SELF'].'?act=check">
<ul style="list-style: none;">
[*]nome: <input type="text" name="nome" />
[*]cognome: <input type="text" name="cognome" />
[*]codice: [img]'.$_SERVER['PHP_SELF'].'?act=img&stringa='.$stringa.'[/img]
[*]inserisci il codice: <input type="text" name="codice" />
[*]<input type="submit" name="invia" value="invia" />
[/list]
</form>';
break;
endswitch;
?>
</body>
</html>
Ciao e grazie!