From 7bcb31a8f8304dff9f9ae872390693f7ce4757e2 Mon Sep 17 00:00:00 2001 From: luptmoor Date: Wed, 15 Apr 2026 14:26:27 +0200 Subject: [PATCH] user and pw as env vars --- init.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.php b/init.php index ba0d2da..4cbdcc2 100644 --- a/init.php +++ b/init.php @@ -1,4 +1,10 @@ false ]; - $dsn = "pgsql:host=localhost;dbname=WebGIS;port=5432"; - $pdo = new PDO($dsn, 'postgres', '1a2b3c4d5e6f', $opt); + $dsn = "pgsql:host=localhost;dbname=$db;port=5432"; + $pdo = new PDO($dsn, $user, $pass, $opt); // Error-Message } catch(PDOException $e) {