last activity. the ultimate goal is to have an active user list. and a script to be run on every page that updates the users activity.
and then have the inactive users logged out and removed from the active users table in mysql automatically.

my problem is that i dont know where to start i have a good sign in script that works but i dont know what php to put in to make the users get put into the database so they can be updated when they are active on the members pages.

helps? anyone h ave ideas or know what im refering to?

you could try using the PHP function time(). it will store the time in the database as an integer (Unix timestamp) and that way you can choose to display it on the screen how you want. e.g

<?php

$othervars = "othervars";
$current_time = time();

sql = "INSERT INTO yourtable VALUES ('$current_time', ..., '$othervars')";

// If you do not specify what columns the values go into it will insert them in the order they are in the database.

See this for a few of the many ways you can display time how you want.
http://www.tuxradar.com/practicalphp/4/5/3

oh ok but then what do i do after that how do i get the active members? do i have to subtract from time last visited from the current time or something to get the "active" members?

This article has been dead for over six months. Start a new discussion instead.