refactor: migrate API scripts to a centralized directory and implement shared database configuration
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user