Ok...... Right Now Their Username Is Into A Table Named 'online' When They Login , And It Retrieves That In My Online List , It Deletes They From The Online List WHEN They Click LOGOUT , but heres The Prob If They Dont Click LOGOUT Then They Wont Be Removed From The Online List And If They Relogin Without Loging Out There Nick Will Be There 2x , Anyone Can Help Me Fix This ?
Online List
Collapse
X
-
FlareXTags: None
-
FlareX -
Guest
basically, your function that adds people to the online list should follow a structure similar to this::
Code:--add a timestamp to the online table which is checked everytime somebody loads a page on your site, and if the time is more than 10minutes ago, delete it regardless who it is .. --then check if the current user (if not a guest) is already on there, then UPDATE the timestamp with the new value --elseif the person isnt already on there, then it should add the person to the table with the sql that it sounds like you already have or redirect them to the login page --add a few debugging things that check everything is running okay and tell you if it isnt --and then display the relevant output depending on if the user is logged in, not logged in but can still access the page, not logged in but is required to do so, or anything else you can think of like specific functions / actions not working or the database couldnt be edited for whatever reason
Comment
-
linkrx7 -
FlareX -
Guest
lol, just wanna make sure that it made sense? i have a terrible habit of rambling on when nobody else knows what im talking about lol..
Comment
-
XXX -
XXX
Comment