|
|
@@ -1,14 +1,13 @@
|
|
|
<?php
|
|
|
error_reporting(E_ALL);
|
|
|
class db extends mysqli {
|
|
|
- protected $host = 'localhost';
|
|
|
- protected $user = 'ban';
|
|
|
- protected $pass = 'Blubb123-';
|
|
|
- protected $db = 'ban';
|
|
|
+ private $host = 'localhost';
|
|
|
+ private $user = 'ban';
|
|
|
+ private $pass = 'Blubb123-';
|
|
|
+ private $db = 'ban';
|
|
|
|
|
|
- public function __construct($host = 'localhost', $user = null, $pass = null, $db = null) {
|
|
|
- print_r($user);
|
|
|
- @parent::__construct($host, $user, $pass, $db);
|
|
|
+ public function __construct() {
|
|
|
+ @parent::__construct($this->host, $this->user, $this->pass, $this->db);
|
|
|
if($this->connect_errno){
|
|
|
die($this->connect_error);
|
|
|
}
|