Compare commits
7 Commits
a5cb7875d2
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f1da32298 | |||
| 4424a57a0d | |||
| f7d866104e | |||
| 95e3eadfde | |||
| a81770c27f | |||
| d07fe94d2b | |||
| 7986085ff9 |
+4
-4
@@ -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 ──────────────────────────────────────
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$conn = new mysqli("localhost", "root", "", "gis_project");
|
||||
require_once __DIR__ . '/config.php';
|
||||
$conn = getDB();
|
||||
|
||||
$id = $_POST['id'];
|
||||
|
||||
@@ -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 = [];
|
||||
@@ -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'];
|
||||
@@ -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
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user