summaryrefslogtreecommitdiff
path: root/db_config.php
diff options
context:
space:
mode:
Diffstat (limited to 'db_config.php')
-rw-r--r--db_config.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/db_config.php b/db_config.php
new file mode 100644
index 0000000..d674004
--- /dev/null
+++ b/db_config.php
@@ -0,0 +1,13 @@
+<?php
+$host = '192.168.122.1';
+$dbname = 'savoy';
+$username = 'savoy';
+
+require_once __DIR__ . '/db_passwd.php';
+
+try {
+ $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+} catch(PDOException $e) {
+ die("DB-Verbindung fehlgeschlagen: " . $e->getMessage());
+}