views:

21

answers:

2

i have list of student who have Nintendo DSs, and they should log in my website to solve some sheets (by using DS Opera browser), when they logged in , (status filed at my DB will change from 0 to 1),also the status change to 0 if they log out, what i need is when the student didn't log out and Shut down their DS's , the status should be 0,, i don't have an idea to it, any suggestion would be helpful for me ..

FYI ,DS opera browser limitation here

+2  A: 

Due to the stateless nature of the web, there is no way to get notified what a user shuts down her browser.

The usual solution to this problem is to have some kind of an "I'm still connected" notification using ajax calls, and a timeout on the server side when a user hasn't checked in after a while.

As far as I can tell, there should be a problem doing that on the DS opera browser.

itsadok
Shouldn't it be "As far as I can tell, there should NOT be a problem doing that on the DS opera browser."
Redlab
A: 

While itsadok is correct, you could tell who connected recently by using sessions for all your pages. Life would be a lot simpler if you implement your own session handler using a database for storage - and keep (a copy of) the authenticated username in a separate field from the session data.

C.

symcbean