I have a member based website, and when a user logs on it sets online = 1 in the database, and when they log off it sets it to = 0.
When they close the window, they automatically log off... the session closes. How can I let the database know this? Is there a way I can have the online column automatically turn to 0 after 30 minutes of inactivity or something? Would I need to set up a cron job on the server (I pay for hosting, dont know if I can even do that).
Thanks