false,
PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));
$sql = "CREATE DATABASE IF NOT EXISTS $DBname;
CREATE USER `$DBuserName`@'$DBhostname' IDENTIFIED BY '$DBpassword';
GRANT ALL ON `$DBname`.* TO `$DBuserName`@'$DBhostname';
FLUSH PRIVILEGES;";
$database->exec($sql);
$sql = "use $DBname";
$database->exec($sql);
$sql = file_get_contents('sql/eleonline.sql');
$qr = $database->exec($sql);
$DBcreated = 1;
}
catch(PDOException $e)
{
echo $sql . "
" . $e->getMessage();die();
}
}
function db_err($step, $alert) {
global $DBhostname,$DBuserName,$DBpassword,$DBname,$DBPrefix;
echo "