The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
What is the script to make it so that it says how many users and guests are online and who? I need this in HTML.
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Code:
$mysql_result = mysql_db_query("database", "select count(sessionid) from session", $mysql_link);
$numonline = mysql_fetch_array($mysql_result);
echo "$numonline";
|
|
#3
|
|||
|
|||
|
But I need the HTML version of it. I might try to put it on my webpage. Or would I put something like this:
Code:
<Script Language=PHP 4.4>
$mysql_result = mysql_db_query("database", "select count(sessionid) from session", $mysql_link);
$numonline = mysql_fetch_array($mysql_result);
echo "$numonline";
</script>
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
Quote:
Warning: Supplied argument is not a valid MySQL-Link resource in D:\Inetpub\wwwroot\forums\userstest.php on line 2 Warning: Supplied argument is not a valid MySQL result resource in D:\Inetpub\wwwroot\forums\userstest.php on line 3 Any ideas what the problem may be? |
|
#6
|
|||
|
|||
|
You need to put in:
Code:
require("global.php");
|
|
#7
|
|||
|
|||
|
This is the exact code I am using, but still get the same errors. I changed the name of the database to my test vb, but still no luck.
Code:
<?php
require("global.php");
$mysql_result = mysql_db_query("database", "select count(sessionid) from session", $mysql_link);
$numonline = mysql_fetch_array($mysql_result);
echo "$numonline";
?>
|
|
#8
|
|||
|
|||
|
What errors does it give you? Parse errors, or what?
-jim |
|
#9
|
|||
|
|||
|
my guess is your path to global.php is wrong. If it can't find that file it won't work.
|
|
#10
|
|||
|
|||
|
Quote:
|
![]() |
|
|