Advertisement
Guest User

Untitled

a guest
May 17th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2. $username = $_POST['user'];
  3. $password = $_POST['password'];
  4.  
  5. if($username&&$password){
  6.  
  7. //Connect to DB
  8. include_once("db_connect.php")or die ("Couldnt connect to DB");
  9. //Checks whether Username exists
  10. $query = mysqli_query("SELECT * FROM user WHERE user='$username
  11. AND password = '$password';");
  12. $rows = mysqli_num_rows($query);
  13.  
  14.  
  15. echo $rows;
  16.  
  17. }else{
  18.  
  19. echo "Please enter information";
  20. }
  21. ?>
  22.  
  23. $rows = mysqli_num_rows(£result);
  24. ^ remove this "libra" characted and add dolar $
  25.  
  26. $rows = mysqli_num_rows($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement