Modified PHP

This commit is contained in:
2020-07-16 16:26:47 +02:00
parent 851b902867
commit 8e7bcecec8
7 changed files with 60 additions and 46 deletions

View File

@@ -1,10 +1,10 @@
$host = 'mysql';
$user = getenv('MYSQL_USER');
$pass = getenv('MYSQL_PASSWORD');
$user = getenv('MYSQL_USER');
$pass = getenv('MYSQL_PASSWORD');
$conn = mysqli_connect($host, $user, $pass);
if (!$conn) {
exit('Connection failed: '.mysqli_connect_error().PHP_EOL);
}
$conn = mysqli_connect($host, $user, $pass);
if (!$conn) {
exit('Connection failed: '.mysqli_connect_error().PHP_EOL);
}
echo 'Successful database connection!'.PHP_EOL;
echo 'Successful database connection!'.PHP_EOL;