# Who's online?

**URL:** <https://forum.kirupa.com/t/whos-online/159260>\
**Category:** Uncategorized\
**Created:** [August 16, 2005, 5:43am UTC](https://forum.kirupa.com/t/whos-online/159260 "2005-08-16T05:43:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbrollwitme](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pbrollwitme](https://forum.kirupa.com/u/pbrollwitme)\
**Post date:** [August 16, 2005, 5:43am UTC](https://forum.kirupa.com/t/whos-online/159260/1 "2005-08-16T05:43:10Z")

</div>

i have a database that i want to use for a chat room. When a user signs on, his/her name is added to the database for the “Who’s Online” list. I know how to add the user to the database, but how do I remove the users name from the database when he/she closes the chat window?? I assume i would call if(die) or something to that nature in my php. Any one have any ideas?  
Thanks!
