Re: [PHP] Session - to restrict same user from two logins

2001-07-26 Thread Saquib Farooq

> >  an easier way of doing this is to have a database of users with their
> > password in the table and when they log on simply mark them logged using
> > sum boolean variable. this will, cut down time.
> > good luck!.
> > and remeber  Have a nice day :)
> 
> And when would you uncheck the boolean value? In theory, when the
> session expires, but there's no event being triggered. Only solution would
> be to check for active sessions periodically, or something like this...
> Ideal solution would be for php to do it by itself when the session
> expires..

yes i totally agree with you, and i have posted questions about
this problem titled "knowing when a visitor leaves", the best best way is
to make the users click the "logout" button and if they dont, then we do
it the YAHOO! way or better said the deco!! way, to check if the session
is active or inactive. 

-- 
Saquib Farooq
@
Systems @ SDNPK 
Islamabad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session - to restrict same user from two logins

2001-07-26 Thread mike cullerton

on 7/26/01 11:06 AM, deco at [EMAIL PROTECTED] wrote:

>> an easier way of doing this is to have a database of users with their
>> password in the table and when they log on simply mark them logged using
>> sum boolean variable. this will, cut down time.
>> good luck!.
>> and remeber  Have a nice day :)
> 
> And when would you uncheck the boolean value? In theory, when the
> session expires, but there's no event being triggered. Only solution would
> be to check for active sessions periodically, or something like this...
> Ideal solution would be for php to do it by itself when the session
> expires..
> 
instead of a boolean you could use a timestamp and update it each time a
page is loaded. then a cron job could come by periodically and delete
sessions older than some specified time.

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session - to restrict same user from two logins

2001-07-26 Thread deco

>  an easier way of doing this is to have a database of users with their
> password in the table and when they log on simply mark them logged using
> sum boolean variable. this will, cut down time.
> good luck!.
> and remeber  Have a nice day :)

And when would you uncheck the boolean value? In theory, when the
session expires, but there's no event being triggered. Only solution would
be to check for active sessions periodically, or something like this...
Ideal solution would be for php to do it by itself when the session
expires..



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session - to restrict same user from two logins

2001-07-25 Thread Saquib Farooq

Hello Sheni
when a user logs into a site, the information that the php server
gets is about the machine and not about a particular person, so you have
to associate information with that particular person, what i mean is give
your users passwords and maintain a database of those logged in using
their respective passwords, and whenever a person logs in, run a check
from the database to see if he is there or.
 an easier way of doing this is to have a database of users with their
password in the table and when they log on simply mark them logged using
sum boolean variable. this will, cut down time.
good luck!.
and remeber  Have a nice day :)


On Thu, 26 Jul 2001, Sheni R. Meledath wrote:

> Hello:
> 
> Session:
> I am using sessions for user authentication in one of our sites. Are there 
> any ways to restrict the same user from logging in from two different 
> machines. That is, once if the user is logged in, and if somebody tries to 
> log-in using the same userid and password it should be able it display a 
> message 'already logged in from other another computer'.
> 
> I have seen a similar sample in venturewire.com.
> 
> Please help  me to find out a solution for this.
> 
> Many thks & best rgds
> 
> 
> 
> Sheni R Meledath
> [EMAIL PROTECTED]
> 
> 
> 

-- 
Saquib Farooq
@
Systems @ SDNPK 
Islamabad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]