SHARE
TWEET

Untitled

a guest Mar 17th, 2018 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $username = $_POST['username'];
  4. $password = $_POST['password'];
  5.  
  6. $query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
  7. $result = mysql_query($query);
  8. $numrows = mysql_num_rows($result);
  9.  
  10. if($numrows == 1)
  11. {
  12. $row = mysql_fetch_array($result, MYSQL_ASSOC);
  13.  
  14. session_start();
  15. $_SESSION['logged_in'] = true; //Is this a BAD BAD thing to do?
  16.  
  17. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top