Ohh okay i did not know you could store as images as an option! Did that and this is my code i used to display latest threads with avatars on an external page...
PHP Code:
<?php
$selectpost = mysql_query("SELECT * FROM post ORDER by postid DESC LIMIT 5");
while ($row = mysql_fetch_array($selectpost)){
$forumid = $row["postid"];
$threadid = $row["threadid"];
$cat = $row["pagetext"];
$poster = $row["username"];
$lastpost = $row["dateline"];
$date = date('m-d-Y', $lastpost);
$useridmain = $row["userid"];
$selectthread = mysql_query("SELECT * FROM thread WHERE threadid='$threadid'");
while ($row = mysql_fetch_array($selectthread)){
$threadid2 = $row["threadid"];
$title = $row["title"];
}
$spic = mysql_query("SELECT * FROM customavatar WHERE userid='$useridmain'");
while ($row = mysql_fetch_array($spic)){
$userid = $row["userid"];
$filename = $row["dateline"];
}
if (mysql_num_rows($spic) == 0){
$picurl = "http://ocroom.net/images/none.jpg";
} else {
$picurl = "http://ocroom.net/forums/image.php?u=$userid";
}
$newcat = strlen($cat);
if ($newcat > 400)
{ $cat = substr($cat, 0, 400) . '...'; }
echo "
<div class='newspic'><img src='$picurl' width='79' height='79' alt='$poster' /></div>
<div class='newsauthor'><span class='author'>Author:</span> $poster<br />
<span class='author'>Date:</span> $date<br />
<span class='author'>Category:</span> $title</div>
<div class='newstext'>$cat</div>
<div class='newssep'></div>
";
}
?>
Thanks for your help