Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. include_once "template.php";
  5. include_once "inc/database.php";
  6.  
  7. $username = $_POST["username"];
  8. $password = $_POST["password"];
  9.  
  10. $sql = "SELECT username FROM users WHERE username='$username' AND password='$password'";
  11. $query = mysql_query($sql);
  12. if (mysql_num_rows($query)) {
  13. echo "Thanks for logining in! <a href='index.php'>Return to index</a>";
  14. } else {
  15. echo "Looks like you have entered unvalid information, please try again";
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement