Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.     class dataBase{
  3.         private $servername = "localhost";
  4.         private $username = "root";
  5.         private $password = "";
  6.         private $dbname = "Ativ";
  7.  
  8.         private $conn;
  9.  
  10.         public function getConn(){
  11.             return $this->conn;
  12.         }
  13.  
  14.         public function createConn(){
  15.             $this->conn = new mysqli($this->servername, $this->username, $this->password, $this->dbname);
  16.         }
  17.     }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement