Advertisement
Guest User

Untitled

a guest
Dec 20th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. class DatabaseConnector {
  3. public $host;
  4. public $dbname;
  5. public $username;
  6. public $password;
  7.  
  8. public function __construct($host, $dbname, $username, $password){
  9. $this->host = $host;
  10. $this->dbname = $dbname;
  11. $this->username = $username;
  12. $this->password = $password;
  13. }
  14.  
  15. public function connect(){
  16. return new mysqli($this->host, $this->username, $this->password, $this->dbname);
  17. }
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement