PDA

View Full Version : show online users and php in the header


azmi
09-24-2003, 09:14 AM
i try to modify my header

i only want show the name(!) of currently "online users" in the header.
(i only found the hack with number of online users)

next problem:
i installed a chat.
then i have a mysql (php) with "how many users are in the chat"
now i want to show the number in the header.

code:
<?
include("connect.php");
?>
<?
$user = mysql_query(" SELECT * FROM wichat_users where chat_room ");
$usertoday = mysql_num_rows($user);
echo $usertoday;
?>

to show like this in the header
currently users in the chat : 6

anyone an idea?

Tony G
09-24-2003, 10:11 AM
I believe they would both need hacks, or possibly phpinclude could work if you don't want to touch your files.

azmi
09-25-2003, 09:04 AM
i have modified my header (online user's)
it works correct!

but showing how many users are in the chat is my greatest problem.
perhaps there is a hack, where you can show a "mysql_query" in forumhome?