Advertisement
Guest User

Untitled

a guest
Aug 5th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. include 'db_connect.php';
  4.  
  5. $username = $_POST["username"];
  6. $pass = $_POST["pass"];
  7.  
  8. $sql = "SELECT * FROM users WHERE username='$username' AND pass='$pass'";
  9. $result = $conn->query($sql);
  10.  
  11. if(!$row = $result->fetch_assoc()) {
  12.     echo "Your login or password is incorrect";
  13. } else {
  14.     echo "You are logged";
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement