View Full Version : Displaying userlist in my php chat

02-25-2007, 10:14 PM
I'm building a small php chat and i'm now trying to make a userlist. Problem is, I can't find a way to make the users work without a mysql database... which is what I want.

as of right now, I can display the users.. but everytime the page refreshes, they reappear!!! (because I have a meta refresh in users.php)

if (isset($user)){ // user is $_SESSION['username']
$file = fopen($fileN,"a";
$txt = fwrite($file,"$user<br>";

what i'm trying to do is take each user, put them in an array, and after that, make a foreach so each user get displayed. I also want to remove a user from the list when he hasn't typed anything for the past 5 minutes.. but i'm stuck!!!

Any help would be appreciated!