Okay.. I want to be able to show on an external page (outside of vbulletin) the number of total regged users, and the number of online users..
This code was workign PERFECTLY with vB114 but it produces an error with vb2..
heres the code..
Code:
<?
require("forum/admin/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$loggedins=mysql_query("SELECT COUNT(sessionid) AS sessions FROM session",$db);
$tempa=mysql_fetch_array($loggedins);
$totalonline=$tempa[sessions];
$registered=mysql_query("SELECT COUNT(userid) AS registered FROM user",$db);
$tempb=mysql_fetch_array($registered);
$regged=$tempb[registered];
echo "<font face=arial size=2>
We have a total of $regged registered users. There are currently $totalonline users online at the moment.</font>
";
?>
and now heres what it shows with vb 20 installed..
"Warning: 0 is not a MySQL result index in /home/redg/htdocs/online2.php on line 7
We have a total of 3130 registered users. There are currently users online at the moment. "
any ideas are greatly appreciated..
slip