2020-03-14 19:14:26 +01:00
|
|
|
<?php
|
2018-06-01 20:43:25 +02:00
|
|
|
|
|
|
|
//Create DB connection.
|
|
|
|
//This creates a usable "database" - Variable as mysqli Objekt
|
|
|
|
//simply remove the "~" in front of the filename
|
2020-03-14 19:14:26 +01:00
|
|
|
$user = 'root';
|
|
|
|
$password = 'Test';
|
|
|
|
$db = 'kd42696_ipr-projekt';
|
|
|
|
$host = 'db';
|
2018-06-01 20:43:25 +02:00
|
|
|
$port = 3306;
|
|
|
|
|
|
|
|
$database = new mysqli($host, $user, $password, $db, $port);
|
|
|
|
|
|
|
|
if ($database->connect_error) {
|
|
|
|
die('Connect Error (' . $database->connect_errno . ') ' . $database->connect_error);
|
|
|
|
}
|
|
|
|
|
2020-03-14 19:14:26 +01:00
|
|
|
?>
|