Advertisement
Guest User

Untitled

a guest
Nov 24th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. ```php
  2.  
  3. <?php
  4. // Connection details
  5. $dbhost = "mysql.hostinger.co.uk"; //!! localhost or the ip of the server
  6. $dbname = "u366174572_users"; //!! name of the database
  7. $dbuser = "u366174572_admin"; //!! username
  8. $dbpass = "ug7c2cvjGX"; //!! password
  9.  
  10. $user = $_GET['u'];
  11. $pass = $_GET['p'];
  12. $hwid = $_GET['h'];
  13.  
  14. $con = mysqli_connect($dbhost, $dbuser, $dbpass);
  15.  
  16. $verb = mysqli_select_db($con, $dbname);
  17.  
  18. if ($verb)
  19. {
  20.     $sql = "SELECT * FROM users WHERE username='$user' AND password='$pass' AND hwid='$hwid'";
  21.     $quer = mysqli_query($con, $sql);
  22.     $num = mysqli_num_rows($quer);
  23.     if ($num == 0) {
  24.         echo("0");
  25.         exit();
  26.     }
  27.     elseif ($num == 1) {
  28.         echo("1");
  29.     }
  30.    
  31.    
  32. }
  33. ?>```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement