Advertisement
Guest User

Untitled

a guest
Mar 6th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. $username = $_POST['username'];
  6.  
  7. $password = $_POST['password'];
  8.  
  9. if ($username&&$password)
  10.  
  11. {
  12. $connect = mysql_connect("finance.com","citigold00","12345") or die("cannot connect!");
  13. mysql_select_db("citigold_uloaku") or die("cannot find data base!");
  14.  
  15. $query = mysql_query ("SELECT * FROM keyaku WHERE username='$username'&&password='$password'");
  16.  
  17. $numrows = mysql_num_rows($query);
  18.  
  19. if ($numrows!=0)
  20. {
  21. while ($row = mysql_fetch_assoc($query))
  22. {
  23. $dbusername = $row['username'];
  24. $dbpassword = $row['password'];
  25. }
  26. if ($username==$dbusername&&$password=$dbpassword)
  27. {
  28. echo "Welcome man";
  29. }
  30. else
  31. echo "Wrong Password";
  32. }
  33. else
  34. die("That user is fake");
  35.  
  36. }
  37.  
  38. else
  39. die("Please Enter a UserName and Password.");
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement