prepare($sql); $stmt->bindParam(':accountid', $accountid); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); header('Content-Type: application/json'); echo json_encode($result);