SHARE
TWEET

Untitled

a guest May 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if( ! defined('PATH')) die('No Direct Script Access Allowed!');
  2.  
  3. $user   = uri_seg(2);
  4. $pass   = uri_seg(3);
  5.  
  6. if (! $user || ! $pass)
  7. {
  8.     echo "ERROR: Data not formatted properly! Please format /h4x-verify/user/passhash";
  9.     echo " and try again!";
  10.     die();
  11. }
  12.  
  13.  
  14. // DB Connection
  15. $dbhost = 'localhost';
  16. $dbname = 'db';
  17. $dbuser = 'user';
  18. $dbpass = 'pass';
  19. $conn   = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect to Database!');
  20. mysql_select_db($dbname) or die('Could not select Database!');
  21.  
  22. // Run Query
  23. $sql    = "select * from members where member_name='$user' and passwd='$pass'";
  24. $query  = mysql_query($sql);
  25. $result = mysql_num_rows($query);
  26. echo $result;
  27. mysql_close($conn);
RAW Paste Data
Top