1. make a "logged_time" column somewhere in your database (I put this in my users table) 2. When your users log in do something like this in your login script: 3. On the top of each page...or in your header file have this: 4. Here are your main functions: 0){ list($total) = mysql_fetch_row($result); $days = floor($total / 86400); $hours = floor(($total % 86400) / 3600); $minutes = floor(($total % 3600) / 60); echo "$days days, $hours hours and $minutes minutes."; }else{ echo "No Logged Time Available"; } } ?> To output the information all you have to do is this: