prepare($sql); $stmt->bindParam(':id', $id, PDO::PARAM_INT); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row && isset($row['status'])) { echo json_encode([ "status" => "success", "data" => $row['status'] ]); } else { jsonError("Ride not found."); } ?>