11-07-2000, 02:22 PM
I used a whosonline hack I found in this forum to create a remote message which reads "There Are Currently xx Members and xx Guests Online" that I would like to place on my .shtml homepage. I tried calling the file via an SSI command <!--#include virtual="/forums/online.php3"-->.
It works great in IE, but returns an error in Netscape. Any clue why? The test page is at http://www.babyuniversity.com/test/php_test.shtml.
The content of the online.php3 file is
<?php
chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT . "/forums/global.php3");
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0");
$guests=$loggedins[sessions];
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0");
$members=$loggedins[sessions];
echo "There are currently $members forum members and
$guests guests online. <a href=/forums/index.php3>Join us!</a>";
?>
Thanks!
It works great in IE, but returns an error in Netscape. Any clue why? The test page is at http://www.babyuniversity.com/test/php_test.shtml.
The content of the online.php3 file is
<?php
chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT . "/forums/global.php3");
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0");
$guests=$loggedins[sessions];
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0");
$members=$loggedins[sessions];
echo "There are currently $members forum members and
$guests guests online. <a href=/forums/index.php3>Join us!</a>";
?>
Thanks!