Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. $username = $_POST['username'];
  4. $password = $_POST['password'];
  5.  
  6. if ($username && $password)
  7. {
  8.  
  9. $connect = mysql_connect("localhost", "root", "7c8wc3") or die("Could not connect!");
  10. mysql_select_db("phplogin") or die ("could not find database");
  11.  
  12. $query = mysql_query("SELECT * FROM users WHERE username='$username'");
  13.  
  14. $nurows = mysql_num_rows($query);
  15.  
  16. ech $numrows;
  17.  
  18. }
  19. else
  20. die("Please enter a username and password");
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement