Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- while($info = mysql_fetch_array( $check ))
- {
- $_POST['pass'] = stripslashes($_POST['pass']);
- $info['password'] = stripslashes($info['password']);
- $_POST['pass'] = md5($_POST['pass']);
- if ($_POST['pass'] != $info['password'])
- {
- die('Incorrect password, please try again.');
- }
- else
- {
- $_POST['username'] = stripslashes($_POST['username']);
- $hour = time() + 3600;
- setcookie(ID_my_site, $_POST['username'], $hour);
- setcookie(Key_my_site, $_POST['pass'], $hour);
- header("Location: index.php");
- }
- }
- ?>
Add Comment
Please, Sign In to add comment