Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($_SERVER["REQUEST_METHOD"] == "POST"){
- if(empty(trim($_POST["username"]))){
- $username_err = 'Please enter username.';
- } else{
- $username = trim($_POST["username"]);
- }
- // Check if password is empty
- if(empty(trim($_POST['password']))){
- $password_err = 'Please enter your password.';
- } else{
- $password = trim($_POST['password']);
- }
- #echo $username;
- #echo $password;
- $sql = "SELECT username, password, failed_logins FROM users WHERE username = $username";
- $row = mysqli_query($link, $sql);
- echo $row;
- // Close connection
- mysqli_close($link);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement