Change config to match db

This commit is contained in:
miaaurl
2026-06-12 13:19:33 +07:00
parent 961e40030b
commit a2dfd4f2a7
3 changed files with 16 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
<?php
$host = "localhost";
$user = "root";
$pass = "";
$db = "webgis_bansos";
$host = getenv('DB_HOST') ?: "localhost";
$user = getenv('DB_USER') ?: "root";
$pass = getenv('DB_PASS') !== false ? getenv('DB_PASS') : "";
$db = getenv('DB_NAME') ?: "webgis_bansos";
// 1. Koneksi awal ke MySQL host tanpa memilih database
$conn = new mysqli($host, $user, $pass);