Compare commits

...

7 Commits

7 changed files with 13 additions and 8 deletions
+4 -4
View File
@@ -4,10 +4,10 @@
// Ganti nilai di bawah sesuai pengaturan XAMPP / phpMyAdmin
// ============================================================
define('DB_HOST', 'localhost'); // biasanya localhost
define('DB_NAME', 'gis_ptk'); // nama database (buat dulu di phpMyAdmin)
define('DB_USER', 'root'); // username MySQL (default XAMPP: root)
define('DB_PASS', ''); // password MySQL (default XAMPP: kosong)
define('DB_HOST', getenv('DB_HOST') ?: 'localhost');
define('DB_NAME', getenv('DB_NAME') ?: 'gis_ptk'); // <--- Sudah diubah ke gis_ptk
define('DB_USER', getenv('DB_USER') ?: 'root');
define('DB_PASS', getenv('DB_PASS') !== false ? getenv('DB_PASS') : '');
define('DB_CHARSET', 'utf8mb4');
// ── Buat koneksi PDO ──────────────────────────────────────
+2 -1
View File
@@ -1,5 +1,6 @@
<?php
$conn = new mysqli("localhost", "root", "", "gis_project");
require_once __DIR__ . '/config.php';
$conn = getDB();
$id = $_POST['id'];
+2 -1
View File
@@ -1,6 +1,7 @@
<?php
header('Content-Type: application/json');
$conn = new mysqli("localhost", "root", "", "gis_project");
require_once __DIR__ . '/config.php';
$conn = getDB();
$result = $conn->query("SELECT * FROM worship_places");
$places = [];
+2 -1
View File
@@ -1,6 +1,7 @@
<?php
header('Content-Type: application/json');
$conn = new mysqli("localhost", "root", "", "gis_project");
require_once __DIR__ . '/config.php';
$conn = getDB();
$name = $_POST['name'];
$lat = $_POST['lat'];
+3 -1
View File
@@ -1,5 +1,7 @@
<?php
$conn = new mysqli("localhost", "root", "", "gis_project");
require_once __DIR__ . '/config.php';
$conn = getDB();
$id = $_POST['id'];
$rad = $_POST['radius'];
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.