Online List

Started on the old forum in July 2007 · view the original in the archive · old links redirect here

8 replies · 2,090 views · started 19 years ago · 1 min read

FlareX #1

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 ?

FlareX #3

i started my own

Guest #4

basically, your function that adds people to the online list should follow a structure similar to this::

--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
linkrx7 #5

put a query in to delete them from online if there idle for so long

FlareX #6

ayt thankz

Guest #7

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..

XXX #8

Flarex...i told you how to do it......so now you believe me right?

XXX #9

Flarex...i told you how to do it......so now you believe me right?

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close