Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2. session_start();   
  3. echo $_SESSION['secure'] = mt_rand(1000,9999);
  4.  
  5. if(isset($_POST['check_captcha'])){
  6.     if($_SESSION['secure'] == $_POST['captcha']){
  7.     echo"match";   
  8.     }else{
  9.     echo " No match";
  10.     }
  11. }
  12. ?>
  13.  
  14.  
  15. <form method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>">
  16.     <input type="text" name="captcha"/>
  17.     <input type="submit" name="check_captcha" value="login"/>
  18. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement