prepare($sql); $stmt->bindParam(':passenger_id', $user_id); $stmt->bindParam(':latitude', $latitude); $stmt->bindParam(':longitude', $longitude); if ($stmt->execute()) { jsonSuccess(null, "Location logged successfully"); } else { jsonError("Failed to log location", 500); } } catch (PDOException $e) { error_log("Database Error in save_passenger_location.php: " . $e->getMessage()); jsonError("An error occurred while logging location", 500); } ?>