Advertisement
Guest User

Untitled

a guest
Sep 17th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?
  2.  
  3. class wizRegister {
  4.    
  5.     protected $sql;
  6.     protected $dir;
  7.     protected $pass;
  8.     protected $lines;
  9.     public $i;
  10.    
  11.     protected $username;
  12.     protected $password;
  13.     protected $email;
  14.    
  15.     function SQL($file) {
  16.         $rem = file_get_contents("{$file}.ini");
  17.         $host = explode("[host] ", $rem);
  18.         $root = explode("[root] ", $rem);
  19.         $pass = explode("[pass] ", $rem);
  20.        
  21.         $this->sql = $host;
  22.         $this->dir = $root;
  23.         $this->pass = $pass;
  24.         $this->port = $intE;
  25.        
  26.         return mysql_connect($this->host, $this->root, $this->pass, [$this->port]);
  27.     }
  28.    
  29. }
  30.  
  31. new wizRegister();
  32. wizRegister::SQL("sql");
  33.  
  34. if(isset($_POST["Submit"])) {
  35.     $user = $_POST["Username"];
  36.     $pass = $_POST["Password"];
  37.     $repass = $_POST["RepeatPassword"];
  38.     $email = $_POST["Email"];
  39.    
  40.     $this->username = $user;
  41.     $this->password = array($pass, $repass, rand(0, 999999999) . "i");
  42.     $this->email = $email;
  43.    
  44.     mysql_select_db("wizguin");
  45.     $res = mysql_query("wizguin", "SELECT * users");
  46.    
  47.     if(in_array($this->username, $res) == false) {
  48.         mysql_query('INSERT INTO users(Username, Password, LoginKey, RegisteredTime, Buddies, Ignores, Inventory) VALUES("Test", "Test", "123", "123", "[]", "[]", "[]")');
  49.     }
  50.    
  51.     else echo "Could not register.";
  52. }
  53.  
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement