Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once 'connect.php';
- session_start();
- header('Location:villageview.php');
- if (isset($_POST['submit']))
- {
- $player=$_POST['user'];
- $password=$_POST['pass'];
- $player=strip_tags($player);
- $password=strip_tags($password);
- $query = "select username, password, id from users where username='$player' and password='$password'";
- $result = mysql_query($query) or die("Could not query users");
- $result2 = mysql_fetch_array($result);
- if ($result2)
- {
- $_SESSION['uid'] = $result2['id'];
- }
- else
- {
- echo "<big>Wrong username or password.<A href='index.php'>Try Again</a></big>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement