Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5. include_once "connect.php";
  6.  
  7.  
  8.  
  9. $username = $_POST['username'];
  10. $password = $_POST['password'];
  11.  
  12.  
  13.  
  14. if ($_POST['systemCall'] == "checkLogin") {
  15.  
  16.  
  17.  
  18.  
  19. $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'";
  20.  
  21. $query = mysql_query($sql);
  22.  
  23.  
  24.  
  25. $login_counter = mysql_num_rows($query);
  26.  
  27.  
  28.  
  29. if ($login_counter > 0) {
  30.  
  31.  
  32.  
  33. while ($data = mysql_fetch_array($query)) {
  34.  
  35.  
  36.  
  37. $userbio = $data["user_bio"];
  38.  
  39.  
  40.  
  41. print "systemResult=$userbio";
  42.  
  43. }
  44.  
  45. } else {
  46.  
  47. print "systemResult=The login details dont match our records.";
  48.  
  49. }
  50.  
  51. }
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement