Hey thanks for taking a look at this problem.
I am trying to create a function that enables me to call it from any page and it will tell me what users are logged on at the present time.
First I want to connect to my database and retrieve the number of users online and there username.
After I have the number of user (mysql_num_rows) and all the usernames (from the select statement) I need to know how to return more than one value.
function checkstatus() {
$link = @mysql_connect("host","user","pass");
@mysql_select_db("database",$link);
$sql = "SELECT user FROM users
WHERE status='Active'";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
for($x=1;$x<=$num_rows,$x++) {
$row = mysql_fetch_array($result);
"some option here"
}
return $activeusers;
}