Advertisement
Guest User

Untitled

a guest
Jan 4th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. include "config.php";
  2. $username = htmlspecialchars(mysqli_real_escape_string($connection, $_GET['username']));
  3. $password = htmlspecialchars(mysqli_real_escape_string($connection, $_GET['password']));
  4.  
  5. $query = "SELECT * FROM `users` WHERE username='$username' and password='$password'";
  6.  
  7. $result = mysqli_query($connection, $query) or die(mysqli_error($connection));
  8. $count = mysqli_num_rows($result);
  9.  
  10. if ($count == 1){
  11. echo "Login.Success";
  12. }else{
  13. echo "Login.Failed";
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement