daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php>
  2.  
  3. $username = $_POST['username'];
  4. $password = $_POST['password'];
  5.  
  6. if ($username&&$password)
  7. {
  8.  
  9. $connect = mysql_connect("mysql17.000webhost.com","a9703423_george","fatlard1") or die("Could not connect!");
  10. mysql_select_db("a9703423_login") or die("Could not find db");
  11.  
  12. $query = mysql_query("SELECT * FROM users WHERE username='$username'");
  13.  
  14. $numrows = mysql_num_rows($query);
  15.  
  16. if ($numrows!=0)
  17. {
  18.   while ($row =mysql_fetch_assoc($query))
  19.   {
  20.     $dbusername = $row['username'];
  21.     $dbpassword = $row['password'];
  22.   }
  23. {
  24. // check to see if they match!
  25. if ($username==$dbusername&&$password==$dbpassword)
  26. }
  27. {
  28.  else
  29.     echo "Incorrect password!";
  30.  
  31.  {
  32.  
  33.  
  34.  }
  35.  else
  36.     die("That user does not exist");
  37.  
  38. }
  39.  else
  40.     die("Please enter a username and password");
  41.  
  42. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top