Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2. include_once 'connect.php';
  3. session_start();
  4. header('Location:villageview.php');
  5.  
  6. if (isset($_POST['submit']))
  7. {
  8. $player=$_POST['user'];
  9. $password=$_POST['pass'];
  10. $player=strip_tags($player);
  11. $password=strip_tags($password);
  12.  
  13. $query = "select username, password, id from users where username='$player' and password='$password'";
  14. $result = mysql_query($query) or die("Could not query users");
  15. $result2 = mysql_fetch_array($result);
  16. if ($result2)
  17. {
  18. $_SESSION['uid'] = $result2['id'];
  19.  
  20. }
  21. else
  22. {
  23. echo "<big>Wrong username or password.<A href='index.php'>Try Again</a></big>";
  24. }
  25. }
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement