changed the fail notification to react to mysql mistakes

This commit is contained in:
Ismail Cadaroski 2017-02-16 19:37:16 +01:00
parent 364e6a4c7d
commit 9d4465b4ae
1 changed files with 2 additions and 2 deletions

4
db.php
View File

@ -8,7 +8,7 @@ $db_port = '3306';
$con = mysqli_connect("$db_server","$db_user","$db_password","$db","$db_port");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
if (!$con) {
die("Failed to connect to MySQL: ".mysqli_connect_error());
}
?>