Files
intaleq_v3_pure_php/ride/location/get_location_area_links.php
2026-04-28 13:04:27 +03:00

24 lines
491 B
PHP

<?php
require_once __DIR__ . '/../../connect.php';
// Use prepared statement to prevent SQL injection
$sql = "
SELECT * FROM `server_locations`
";
try {
$stmt = $con->prepare($sql);
$stmt->execute();
$car_locations = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($car_locations) {
jsonSuccess($car_locations);
} else {
jsonError("No car locations found");
}
} catch (PDOException $e) {
jsonError("Database error: " . $e->getMessage());
}