Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement