Log in

View Full Version : Adding Date/Time User Logs Into Site...



tomyknoker
03-01-2007, 03:02 PM
Hi all,

I want to be able to sort my users by the top 5 most active... Or the last 5 users to logon... I have added a DATETIME column to my MySQL members table... Just not sure what I now put on the home.php file, so it records the DATETIME into the table automatically... Any help would be greatly appreciated!

Twey
03-01-2007, 04:02 PM
Something along the lines of:
mysql_query('update members_table set last_seen=NOW() where id=' . $_SESSION['user_id']);