Advertisement
Guest User

Untitled

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