From c9ecd6fdf8bc2743a7758f648221abac3c7c26ab Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Mon, 28 Nov 2022 13:24:39 +0100 Subject: [PATCH] config.php update --- Sources/php_script/script/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/php_script/script/config.php b/Sources/php_script/script/config.php index 288763b..4fb2a98 100644 --- a/Sources/php_script/script/config.php +++ b/Sources/php_script/script/config.php @@ -4,13 +4,13 @@ function connection(): bool|int|mysqli { $username = "root"; //Get the username - $host = "10.9.0.37"; //Get the url of the database + $host = $_ENV["HOST"]; //Get the url of the database $password = $_ENV["ROOT_PASSWORD"]; //Get the password for the user selected $db_name = $_ENV["DATABASE"]; //Get the name of the database try { //Try to connect to the database - return mysqli_connect($host, $username, $password); //Connecting to database + return mysqli_connect($host, $username, $password,$database); //Connecting to database }catch (mysqli_sql_exception) { //If the connection failed