Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. $username = mysql_real_escape_string($_POST['username']);
  4. $password = mysql_real_escape_string($_POST['password']);
  5.  
  6. if ($username&&password)
  7. {
  8. $connect = mysql_connect("host","user","password"); or die("Couldn't connect to MySQL Database");
  9. mysql_select_db("dbname"); or die("Couldn't find MySQL Database");
  10.  
  11. $query = mysql_query("SELECT * FROM users WHERE username='$username'");
  12.  
  13. $numrows = mysql_num_rows($query);
  14.  
  15.  
  16.  
  17.  
  18.  
  19. }
  20. else
  21. die("Please enter a Username and a Password");
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement