Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = $_POST['username'];
- $password = $_POST['password'];
- $query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
- $result = mysql_query($query);
- $numrows = mysql_num_rows($result);
- if($numrows == 1)
- {
- $row = mysql_fetch_array($result, MYSQL_ASSOC);
- session_start();
- $_SESSION['logged_in'] = true; //Is this a BAD BAD thing to do?
- ?>
Add Comment
Please, Sign In to add comment