Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DataBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DataBase
protected $username;
protected $password;
protected $databasename;
protected $port;

public function __construct()
{
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions DataBaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}

Expand Down