Guest User

Untitled

a guest
Mar 15th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. }
  3. elseif(!empty($_POST['username']) && !empty($_POST['password']))
  4. {
  5.  
  6. $username = mysql_real_escape_string($_POST['username']);
  7. $password = md5(mysql_real_escape_string($_POST['password']));
  8. $verify = mysql_query("SELECT * FROM users WHERE username = '". $username."' AND password = '". $password. "'");
  9. if(mysql_num_rows($verify) == 1)
  10. {
  11. $row = mysql_fetch_array($verify);
  12. $_SESSION['Username'] = $username;
  13. $_SESSION['Loggedin'] = 1;
  14.  
  15. echo "<h1> Login, Accepted </h1>";
  16. echo "<p>We are now redirecting you to the member area.</p>";
  17. echo "<meta http-equiv='refresh' content='=2;index.php' />";
  18.  
  19. }
  20.  
  21. ?>
Add Comment
Please, Sign In to add comment