I take it you want to do something like capture the amount of time a user has stayed logged in? Well, first, like alyaly said, you'll need to make sure your database has the required tables to handle the login/logout date and time info. Then you'll to use PHP to capture the login time and enter it into the database. Something a little like this:
PHP Code:
$login_date = date("Y-m-d h:i:s");
$sql = "UPDATE ".$tbl_name." SET lastLogin='".$login_date()"' WHERE userid=username";
$result = mysql_query($sql) or die(mysql_error());
You'll have to make changes where necessary, of course, but you get the idea.