Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------- Open Connection Function --------------//
- function DB()
- {
- $this->host = "localhost";
- $this->db = "toplinee_toplline";
- $this->user = "toplinee_topl";
- $this->pass = "toplline";
- $Charset = 'utf8';
- $this->link = mysql_connect($this->host, $this->user, $this->pass);
- mysql_query("SET NAMES $Charset;", $this->link) or die ('Unable to connect to the server: '.mysql_error());
- mysql_select_db($this->db);
- }
- //------- Open Connection Function ---------------//
- //''''''''''''''''''''''''''''''''''''''''''''''''//
- //------- Close Connection Function --------------//
- function close()
- {
- mysql_close($this->link);
- }
- //------- Close Connection Function ---------------//
- //'''''''''''''''''''''''''''''''''''''''''''''''''//
- //------- Get Result Function ---------------------//
- function query($query)
- {
- $result = mysql_query($query, $this->link);
- return $result;
- }
- }
- ?>
- $this->link = mysqli_connect($this->host, $this->user, $this->pass , $this->db);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement