zhshero Posted November 17, 2010 Share Posted November 17, 2010 how would i do and offline or online check so if 5 mins has passed it shows the user as offline date('G:ia'); // 0:00am Quote Link to comment Share on other sites More sharing options...
zhshero Posted November 17, 2010 Author Share Posted November 17, 2010 nvm i got it if this is how its done $userfinal = get_username($_SESSION['user_id']); $the_time = time(); mysql_query("UPDATE users SET date='$the_time' WHERE Username='$userfinal'")or die(mysql_error()); if (isset($user['date']) && (time() - $user['date'] > 60)) { echo 'offline'; } else { echo "<font color=green>[Online Now!]</font>"; } $user['LAST_ACTIVITY'] = time(); // update last activity time stamp ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.