My script is different than yours.... so I don't know the proper lines but...
Code:
$sidebar = "You have {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.<br />
<a href='donate.php'>Donate money to friends</a>";
$stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}users_profile WHERE username='{$loggedinname}'");
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$avatar=$row['avatar'];
$sidebar .= "<img src='{$row['avatar']}' border='0' width='100px' height='100px'><br><br>
<a href='index.php'>Home</a>
<a href='adopt.php'>Dragon Lair</a>
<a href='pound.php'>Abandoned Lair</a>
Lemme know if you need help. And anything else on my site you like let me know. I can try to tell you how to do it.