diff --git a/DataBase.php b/DataBase.php index 6d62bd2..6783346 100644 --- a/DataBase.php +++ b/DataBase.php @@ -10,6 +10,7 @@ class DataBase protected $username; protected $password; protected $databasename; + protected $port; public function __construct() { @@ -21,11 +22,12 @@ public function __construct() $this->username = $dbc->username; $this->password = $dbc->password; $this->databasename = $dbc->databasename; + $this->port = $dbc->port; } function dbConnect() { - $this->connect = mysqli_connect($this->servername, $this->username, $this->password, $this->databasename); + $this->connect = mysqli_connect($this->servername, $this->username, $this->password, $this->databasename, $this->port); return $this->connect; } diff --git a/DataBaseConfig.php b/DataBaseConfig.php index cfb687c..4083476 100644 --- a/DataBaseConfig.php +++ b/DataBaseConfig.php @@ -6,15 +6,15 @@ class DataBaseConfig public $username; public $password; public $databasename; + public $port; public function __construct() { - $this->servername = 'localhost'; $this->username = 'root'; $this->password = ''; $this->databasename = 'test'; - + $this->port = '3306'; } }