Advertisement
Guest User

Untitled

a guest
Apr 11th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2.     class dbClient
  3.     {
  4.         private $host;
  5.         private $serverName;
  6.         private $username;
  7.         private $password;
  8.         private $database;
  9.  
  10.         function __construct($host, $username, $password, $database) {  
  11.             echo('Creating a new database client.');
  12.           $this->host = $host;  
  13.           $this->username = $username;  
  14.           $this->password = $password;  
  15.           $this->database = $database;  
  16.             }
  17.      
  18.       public function connect(){
  19.         $this->db = mysqli_connect($this->host, $this->username, $this->password, $this->database);
  20.        
  21.         return $this->db;
  22.       }
  23.  
  24.     }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement