SHARE
TWEET

Untitled

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