Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Network
- {
- private $ranks;
- private $username = "admin";
- private $password = "Leaving blank for you, G.";
- private $connection;
- public function __construct()
- {
- $this->ranks = array(0 => "Novice",
- 1 => "Acolyte",
- 2 => "Dedicate",
- 3 => "Refina",
- 4 => "Chaplain",
- 5 => "Aperis",
- 6 => "Sangen",
- 7 => "Zealot",
- 8 => "Ophae",
- 9 => "Aderius",
- 10 => "Accone",
- 11 => "Antioch",
- 12 => "Stolnik",
- 13 => "Basileus");
- $this->connection = mysql_connect("network.luckyaceproductions.com", $this->username, $this->password) or
- die("A MySQL error occurred: " . mysql_error());
- mysql_select_db("db_network", $this->connection);
- }
- public function __destruct()
- {
- mysql_close($this->connection);
- }
- public function createUser($Name, $MDivison, $Key, $Rank = 0)
- {
- mysql_query("INSERT INTO Enlisted(MName, Rank, MDivision, MKey) VALUES ('".$Name."', '".$Rank."', '".$MDivision."', '".$Key."')");
- //echo "INSERT INTO Enlisted(MName, Rank, Division, MKey) VALUES ('".$Name."', '".$Rank."', '".$MDivision."', '".$Key."')";
- }
- private function mySQL_query($text)
- {
- $data = mysql_query($text, $this->connection) or
- die("A MySQL error occurred when trying to retrieve data: " . mysql_error());
- $return = array();
- $temp;
- while(mysql_fetch_array($temp)) {
- $return[] = $temp;
- }
- return $return;
- }
- }
- $f = new Network();
- $f->createUser("Blossoming Rufus", "FFOOOOOOOO", "000");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement