|
|
@ -10,6 +10,7 @@ function connection(): bool|int|mysqli
|
|
|
|
|
|
|
|
|
|
|
|
try { //Try to connect to the database
|
|
|
|
try { //Try to connect to the database
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(json_encode(mysqli_connect($host, $username, $password, $db_name)));
|
|
|
|
return mysqli_connect($host, $username, $password, $db_name); //Connecting to database
|
|
|
|
return mysqli_connect($host, $username, $password, $db_name); //Connecting to database
|
|
|
|
|
|
|
|
|
|
|
|
}catch (mysqli_sql_exception) { //If the connection failed
|
|
|
|
}catch (mysqli_sql_exception) { //If the connection failed
|
|
|
|