X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=db.php;fp=db.php;h=5ac36a3b5fcc86ca2f6155e25e4e715d1accb7c0;hp=6964e9568d8667a4366520de08e232458b23fd95;hb=05f4861e64ed6dab2196b3c7f111071d51085fe0;hpb=70f9d228533a08f8b07aa55eebcf6371aee6cef6 diff --git a/db.php b/db.php index 6964e95..5ac36a3 100644 --- a/db.php +++ b/db.php @@ -64,9 +64,10 @@ function db_connect_now($database = 'auto', $user = 'auto', $pass = 'auto', $hos } } - $GLOBALS['wfpl_db_handle'] = mysqli_connect($host, $user, $pass); + $GLOBALS['wfpl_db_handle'] = @mysqli_connect($host, $user, $pass); if(!$GLOBALS['wfpl_db_handle']) { - die('Could not connect to the database: ' . mysqli_error()); + die('Server error: Database connection failed'); + # to show username and host: mysqli_connect_error() } mysqli_set_charset($GLOBALS['wfpl_db_handle'], $encoding);