Guest User

Untitled

a guest
Jan 5th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. while($info = mysql_fetch_array( $check ))
  3.     {
  4.         $_POST['pass'] = stripslashes($_POST['pass']);
  5.         $info['password'] = stripslashes($info['password']);
  6.         $_POST['pass'] = md5($_POST['pass']);
  7.        
  8.         if ($_POST['pass'] != $info['password'])
  9.         {
  10.             die('Incorrect password, please try again.');
  11.         }
  12.         else
  13.         {
  14.             $_POST['username'] = stripslashes($_POST['username']);
  15.             $hour = time() + 3600;
  16.             setcookie(ID_my_site, $_POST['username'], $hour);
  17.             setcookie(Key_my_site, $_POST['pass'], $hour);
  18.             header("Location: index.php");
  19.         }
  20.     }
  21. ?>
Add Comment
Please, Sign In to add comment