Well in my database in my users table i have a field called 'active' and when users are logged in it changes to 1. What im trying to do is write a sql statement that says check if the user id of $_SESSION['uid'] if their active field is set to 1, if so echo out "Online" if that makes sense? sorry lol didnt know how to describe.
something like this...
PHP Code:
$sql = "SELECT active FROM users WHERE active = 1 AND id = ' " . $_SESSION['uid'] . " ' ";
You want something like when the user is online, display some text saying ONLINE in his/her profile and if the user is offline display OFFLINE. Don't you?