<?php
/*
Programing By Omid Zarifi
Website : www.progvig.com
email : zarifi.omid@gmail.com
this class can create a good captcha ( anti robot & worm )
*/
session_start();
$mycd=$_SESSION['security_code'];
if (isset($_POST['code']))
{
if ($mycd==$_POST['code'])
{
echo 'good';
}
else
{
echo("Error");
}
}
?>
<html>
<body>
<?php echo'<img src="img.php" alt="captcha" />';?>
<form method="post">
<input type="text" name="code" />
<input type="submit" value="Send"/>
</form>
</body>
</html>
|