SHARE
TWEET

Untitled

a guest Jun 5th, 2017 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $username = mysql_real_escape_string($_POST['username']);
  3. $password = mysql_real_escape_string($_POST['password']);
  4.  
  5. //Do the lookup
  6. if(mysql_num_rows(mysql_query("SELECT * FROM users WHERE Username=\"".$username."\" AND Password=\"".$password."\"") == 1)) {
  7. //Do session stuff
  8. }
  9. ?>
  10. <html>
  11.     <body>
  12.         <form action="auth.php" method="post">
  13.             <input type="text" name="username"><br>
  14.             <input type="passwrod" name="password"><br>
  15.             <input type="submit" name="submit">
  16.  
  17.         </form>
  18.     </body>
  19. </html>
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