if ($thread['postuserid']) { $thread['postedby'] = "<a href=\"member.php?action=getinfo&userid=$thread[postuserid]\">$thread[postusername]</a>"; } else { $thread['postedby'] = $thread[postusername]; }
$secondname_db=$DB_site->query("SELECT fieldx FROM userfield WHERE userid='$thread[postuserid]'"); $secondname=$secondname_db[fieldx]; if ($thread['postuserid']) { $thread['postedby'] = "<a href=\"member.php?action=getinfo&userid=$thread[postuserid]\">$secondname</a>"; } else { $thread['postedby'] = $secondname; }