Does anyone know where i can find tutorials, or can anyone teach me how to make an online users list with MySQL (and of course PHP). I know about changing a value in a MySQL table, but wot i dont understand, is how do i change that back if someone decides not to proberly log out and just closes the broswer, then the online bit still goin to remain "on". So any help? If you need any info on how teh users are logged in, just ask (eg, using session/cookies etc).Have a table in your DB to keep track of whos online, each time a person loads a page of your site it updates a feild that has a timestamp for thier last activity (page load).
Then have say a limit of say 5 min.
When people load the page do a delete where 'current time'-'timestamp in row' > '5 min' to remove rows for people who havent loaded a page in more than 5 min. In a normal logout just have it delete thier row from the table.should have continued in this post
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=34120sorry">http://www.htmlforums.com/showthread.ph ... 34120sorry</a><!-- m -->, scoutt, but no-one would have noticed if i had posted in the other thread
and thanx marcinAJ!why? if you reply to it then it moves it up top. they will notice.I had no idea! geez, i really need to start learning more about forums....!
Then have say a limit of say 5 min.
When people load the page do a delete where 'current time'-'timestamp in row' > '5 min' to remove rows for people who havent loaded a page in more than 5 min. In a normal logout just have it delete thier row from the table.should have continued in this post
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=34120sorry">http://www.htmlforums.com/showthread.ph ... 34120sorry</a><!-- m -->, scoutt, but no-one would have noticed if i had posted in the other thread
and thanx marcinAJ!why? if you reply to it then it moves it up top. they will notice.I had no idea! geez, i really need to start learning more about forums....!