cheers for the help mate but its still not working

dont happen to know were its going wrong do you mate?
PHP Code:
$users = $DB_site->query("SELECT userid,username,usertitle,field14 FROM user LEFT JOIN userfield USING (userid) WHERE username LIKE '%".addslashes(htmlspecialchars($findname))."%' ORDER BY username");
echo "<table>";
if ($DB_site->num_rows($users)>0) {
echo "<tr><td nowrap><p><b>Team Members Found:</b></p></td>".iif($perms[ismoderator] or $bbuserinfo['usergroupid']==25, "<td nowrap><p> </p></td>", "").iif($perms[ismoderator] or $bbuserinfo['usergroupid']==25, "<td nowrap><p> </p></td>", "")."</tr>\n";
while ($user=$DB_site->fetch_array($users)) {
echo "<tr><td nowrap><p>$user[username] - $user[field14]</p></td>".iif($perms[ismoderator] or $bbuserinfo['usergroupid']==25, "<td nowrap><p>EDIT USER</p></td>", "")."</tr>\n";
}
} else {
echo "<td><p>No Team Members found</p></td>";
}
echo "</table>";
}