Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of majid ramzani  >  CAPTCHA Code  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example of use this class
Class: CAPTCHA Code
Generate random text images for CAPTCHA validation
Author: By
Last change:
Date: 2 years ago
Size: 504 bytes
 

Contents

Class file image Download
<?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>