Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. if($_SERVER["REQUEST_METHOD"] == "POST"){
  2.  
  3.     if(empty(trim($_POST["username"]))){
  4.         $username_err = 'Please enter username.';
  5.     } else{
  6.         $username = trim($_POST["username"]);
  7.     }
  8.  
  9.     // Check if password is empty
  10.     if(empty(trim($_POST['password']))){
  11.         $password_err = 'Please enter your password.';
  12.     } else{
  13.         $password = trim($_POST['password']);
  14.     }
  15.     #echo $username;
  16.    #echo $password;
  17.    $sql = "SELECT username, password, failed_logins FROM users WHERE username = $username";
  18.     $row = mysqli_query($link, $sql);
  19.     echo $row;
  20.  
  21.  
  22.     // Close connection
  23.     mysqli_close($link);
  24. }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement