Advertisement
Guest User

Untitled

a guest
Nov 27th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. $q = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
  4. $r = mysqli_query($dbc, $q) or die(mysqli_error($dbc));
  5. if (mysqli_num_rows($r) == 1)
  6. {
  7. $_SESSION['username'] = $username;
  8. echo '<script type="text/javascript">', 'LoginComplete();', '</script>';
  9. }
  10. else
  11. {
  12. echo '<script type="text/javascript">', 'LoginError();', '</script>';
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement