<?php
session_start();
if(isset($_POST['captchacod'])){
if($_SESSION['login']==$_POST['captchacod'])echo'<a style="color:green">Your Entered Cod Was Correct</a><br>';
else echo'<a style="color:red">Your Entered Cod Was Incorrect</a><br>';
}
?>
<img src="captcha.php?cap=login.png" >
<form action="<?php echo $_SERVER['PHP_SELF']; //safe it later (xss)?>" method="post">
<a>INPUT TEXT :</a><br>
<input type="text" name="captchacod"><br>
<input type="submit" value="check"><br>
</form>
|