memperbaiki koneksi database pada project 1 dan project 2

This commit is contained in:
powji17
2026-06-12 06:23:23 +07:00
parent 070ba54cf3
commit 3cc437bdf8
16 changed files with 32 additions and 120 deletions
+2 -6
View File
@@ -1,12 +1,8 @@
<?php
header('Content-Type: application/json');
// Sesuaikan dengan konfigurasi database Anda
$conn = new mysqli("localhost", "root", "", "webgis");
if ($conn->connect_error) {
echo json_encode(["status" => "error", "message" => "Koneksi database gagal"]);
exit;
}
require_once '../config.php';
$conn = getDB();
$data = json_decode(file_get_contents("php://input"), true);