hi there all..
okay, i was just wondering..
i've been playing around with this concept for quite some times
but this experimentation is getting me no where
it goes sumthin like this..
i have a login page..
so once a person login, he can choose 1 link from a total of 3
that lead him to a page.., say page 1
now, i want to make it so that,
if a person logs on to the 1st page,
no body can visit the page, unless that guy logs off
in other word, the link to the 1st page is not clickable
now, i manage to do so by implementing a database,
the databse will have this table that contains:
- user_id (example: jassh)
- time_in (example: 2003-05-21-14-00-00 ,or something like that)
- page (example: page1)
means, when a person logs in, and click PAGE 1 LINK
the database records the persons ID,
the timestamp (when he logs in), and the page he choose
and also, it create a session for the person..
so when another person logs in,
the 'chose your link' page will query the db,
if page1 exist, than link to page1 is not clickable
and when the person who visit page 1 logs out,
the database will "delete * where user_id = 'jassh'"
now, everything went fine..
except, if a person did not log out, but close it browser instead,
means, the system is unable to "delete * where user_id = 'jassh'"
than, the page is locked, unless i go and delete it manually from the db.
of course, the system will delete it after a certain span of time,
triggered when someone logs in
but till then, the page locked
so, based on this long story of mine,
how do i make so it is mandatory for the person to log off,
or perhaps make the system checks if the guy is still there..
is this even possible..???
i believe if i can understand how the "user browsing this forum"
used in this forum works, i probably can get somewhere
hope this is not too complex
thanks in advanced..
-jassh