Advertisement
Guest User

Untitled

a guest
Aug 9th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2. class Databases{
  3. private $hostname = 'localhost';
  4. private $hostuser = 'root';
  5. private $hostpass = '';
  6. private $dbname = 'db_institute';
  7. public $conn;
  8. public function __construct(){
  9. $this->connection();
  10. }
  11. public function connection(){
  12. $this->conn = new mysqli($this->hostname,$this->hostuser,$this->hostpass,$this->dbname);
  13. return ($this->conn)?$this->conn:false;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement