prepare($sql_str); $stmt->bindParam(':accountid', $accountid); $stmt->execute(); $user = $stmt->fetch(PDO::FETCH_ASSOC); echo $user['name'];