config.php update
continuous-integration/drone/push Build is passing Details

remotes/origin/mvc-implementation
Dorian HODIN 2 years ago
parent 58df1cb4cd
commit 2d4bd6fa7b

@ -4,13 +4,13 @@ function connection(): bool|int|mysqli
{ {
$username = "root"; //Get the username $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 $password = $_ENV["ROOT_PASSWORD"]; //Get the password for the user selected
$db_name = $_ENV["DATABASE"]; //Get the name of the database $db_name = $_ENV["DATABASE"]; //Get the name of the database
try { //Try to connect to 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 }catch (mysqli_sql_exception) { //If the connection failed

Loading…
Cancel
Save