Setting loadin, settings update, db is now global

This commit is contained in:
Marijn Jansen
2017-01-17 16:47:49 +01:00
parent 1edf051dc2
commit 11f2297d5a
6 changed files with 99 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ if ($dbconf === FALSE) {
die("Error parsing XML file");
}
else {
$db = new PDO("mysql:host=$dbconf->mysql_host;dbname=$dbconf->mysql_database;charset=utf8",
$GLOBALS["db"] = new PDO("mysql:host=$dbconf->mysql_host;dbname=$dbconf->mysql_database;charset=utf8",
"$dbconf->mysql_username", "$dbconf->mysql_password")
or die('Error connecting to mysql server');
}