On my main page I have one <? include ("../cgi-bin/newspro/news.txt") ?>

To read in the news generated by my news script.

Now I want to be able to show the people browsing the forums on my main page.

So I used:

chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT . "/forums/global.php");

if ($displayloggedin==1) {
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session");
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0");
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0");

$loggedins=$DB_site->query("SELECT DISTINCT user.userid,username,location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 AND usergroupid<>3 ORDER BY username");
if ($loggedin=$DB_site->fetch_array($loggedins)) {

eval("\$activeusers .= \"".gettemplate("loggedinuser")."\";");

while ($loggedin=$DB_site->fetch_array($loggedins)) {
eval("\$activeusers .= \", ".gettemplate("loggedinuser")."\";");
eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";");

echo "$activeusers and $numberguest guests.";

But when I add that code, the news code isn't working...

If anyone know how to get both calls to work at the same time please post the answer here

Thanks a lot