Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Database {
- private $dbhost,$dbuser,$dbpass,$dbdata,$con;
- public function __construct(){
- global $hotel;
- $this->dbhost = $hotel['db']['host'];
- $this->dbuser = $hotel['db']['user'];
- $this->dbpass = $hotel['db']['pass'];
- $this->dbdata = $hotel['db']['data'];
- $this->con = new pdo('mysql:host=$this->dbhost;dbname=$this->dbname;', $this->dbuser, $this->dbpass);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement