prepare($sql); // Bind the parameters to the SQL query $stmt->bindParam(':passengerId', $passengerId); $stmt->bindParam(':lat', $lat); $stmt->bindParam(':lng', $lng); $stmt->bindParam(':rideId', $rideId); // Execute the statement if ($stmt->execute()) { // Print a success message jsonSuccess(null, "Passenger location saved successfully"); } else { // Print a failure message jsonError("Failed to save passenger location"); } ?>