Guest User

Untitled

a guest
Jan 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. if (isset($_POST['userpassword']))
  2. {
  3. include('db.php'); //I am using passwordu instead of password.
  4. $query = "SELECT * FROM users WHERE username = '".$_REQUEST['username']."' AND passwordu = '".md5($_REQUEST['userpassword'])."'";
  5. $result = mysql_query($query);
  6. $num_rows = mysql_num_rows($result);
  7. if ($num_rows == 1)
  8. {
  9. echo "Congratulations. You are now Logged in. You will be logged out when the Browser is closed.";
  10. $_SESSION['logval'] = TRUE;
  11. }
  12. else
  13. {
  14. echo "You Have Entered Wrong Information. <b>Please Try AGAIN."; }
  15. ?>
  16.  
  17. if ($num_rows >= 1)
  18. {
  19. //Correct info
  20. }
  21. else
  22. {
  23. //Incorrect info
  24. }
Add Comment
Please, Sign In to add comment