You are here: Auto logout « PHP « IT news, forums, messages
Auto logout

Posted by Vaibhav Sibal on 03/15/05 20:06

Hi
I wanted to implement an auto-logout feature for my project so that if
a terminal is left unattended for say 10 minutes, it should
automatically logoff the user. Apart from this, there is another
problem that I am encountering with my authentication scheme, the
scene is as follows :
(1) I am using a $_SESSION variable to transfer the username across
pages, what happens is that I cannot login more than one user from the
same machine since if i try the same the SESSION[username] variable's
value gets changed to the most latest login name. How do i get around
this ?

(2) Secondly, What happens is, when the user logs off from the system,
there are two things that happen at that time, first is that the
session variable is killed manually. The second is that the logged in
status of the user is updated in the database. So what happens is that
when the user is logged on the system, the database shows the user
logged in status as 1 otw it shows it as 0. Now the problem is that if
by chance the user closes the current browser window without actually
logging off, the session variable gets killed automatically but the
database is not updated accordingly. Please suggest some way around
this also.

I would be really happy if you guys can help me with this.

Thanks in advance

Vaibhav

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация