Guest User

Untitled

a guest
May 1st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. <?php
  2. include("includes/mysql_connector.php");
  3.  
  4. $username = mysql_real_escape_string(stripslashes($_POST['u']));
  5. $password = md5($_POST['p']);
  6. $verion = $_POST['ver'];
  7.  
  8. $username_result = mysql_query("SELECT * FROM aq_users WHERE username = '" . $username . "'") or die(mysql_error());
  9.  
  10. if (mysql_num_rows($username_result) > 0) {
  11.     $user_result = mysql_query("SELECT * FROM aq_users WHERE username = '" . $username . "' AND password = '" . $password . "'") or die(mysql_error());
  12.    
  13.     if (mysql_num_rows($user_result) > 0) {
  14.         echo("&status=success&");
  15.        
  16.         $x = 1;
  17.         $char_result = mysql_query("SELECT * FROM aq_characters WHERE username = '" . $username . "'");
  18.         while ($char = mysql_fetch_array($char_result)) {
  19.             echo("id" . $x . "=" . $char['id'] . "&");
  20.             echo("char" . $x . "=" . $char['charname'] . "&");
  21.             echo("level" . $x . "=" . $char['level'] . "&");
  22.             echo("intCharType" . $x . "=" . $char['type'] . "&");
  23.             echo("turns" . $x . "=15&");
  24.             $x++;
  25.         }
  26.        
  27.         $user = mysql_fetch_assoc($user_result);
  28.         echo("intCanEmail=" . $user['confirmed'] . "&");
  29.     } else {
  30.         echo("&status=badpassword");
  31.     }
  32. } else {
  33.     echo("&status=usernotfound");
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment