Update config.php

This commit is contained in:
nolanwhy 2023-02-04 22:52:07 +01:00
parent 25dcf4727d
commit c48e3fc92e
1 changed files with 10 additions and 1 deletions

View File

@ -13,8 +13,17 @@ if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
// easier to edit shit
$sql = [
"dbname" => "GruBlox",
"host" => "localhost",
"port" => 3306,
"user" => "root",
"pass" => ""
];
try {
$con = new PDO("mysql:dbname=GruBlox;host=localhost", "root", "");
$con = new PDO("mysql:dbname=".$sql["dbname"].";host=".$sql["host"].";port=".$sql["port"], $sql["user"], $sql["pass"]);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
} catch (PDOException $e) {
echo "Connection failed: " . $e->getMessage();