hi there,
trying to output how many registered users is online !
this is my sintax, and i wonder if this is correct ?
registering session like this : just to show !
$loggedin = true;
$upwd = $password;
$msg = "Welcome $uname, you are now logged in. <a href=index.php>Click here</a> to return to the front page.";
session_register("loggedin");
session_register("upwd");
session_register("uid");
session_register("uname");
code for registered users online:
<?
if (logincheck($uid, $upwd)) {
$sql_query = "SELECT * FROM users ORDER BY userid LIMIT 5";
$result = mysql_query($sql_query);
if(mysql_num_rows($result))
{
echo ("<hr>");
echo ("<span class=\"style1\">online now:</span></br>");
echo ("<span class=\"style5\">$uname</span><br>");
}
//if no fields exist
else
{
echo "no values in the database";
}
}
?>
I wonder if this will output right, and have it like those bug guys, registered users browsing this site?
Thank you