Top
Home
Place as Form Field

<tr>
<td class="Fear" valign=top>Capcha<font color="red">*</font> </td>
<td class="Farm" valign="top"><img src="captchas.php"> <br>
<input type="text" size="10" name="check"> <br> </td>
</tr>



Place in Processing php

<?php session_start();
if(($_POST['check']) == $_SESSION['check']) { 
echo 'Input OK';
}else{ 
echo 'Input Wrong';
exit;
}
?>



captchas.php

<?php session_start(); 
$img = imagecreatefrompng('black.png'); 
$numero = rand(100, 999); 
$_SESSION['check'] = ($numero); 
$white = imagecolorallocate($img, 255, 255, 255); 
imagestring($img, 10, 8, 3, $numero, $white);
header ("Content-type: image/png"); imagepng($img); 
?>



black.png