}
}
- $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);