[PHP] Re: application variable

2002-01-19 Thread Joe Van Meer

Hi there, I usually test at the top of the page that does my 'logging-in' to
see if the variable I set for each user once they actually login is set.
So if I set a variable called '$isloggedin' upon a successful login, I would
check at the top of that page to see if it is set or not, if it's already
set bypass the login and redirect them to a new page.

HTH Joe :)




Ye Tun [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Do we have application variable in PHP as in ASP?

 I have a small database running with user name and password kept in MySQL
 database.  Once user is login, how can I prevent the same user from
 logging in again?

 REgards,

 Ye




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




[PHP] RE: application variable

2002-01-04 Thread Tim Ward

I think what you mean is sessions, but that can't really do what you want.
The best you can do is record on the database when the user last accessed a
page of the site and infer if they are currently logged in or not.

I would be interested to know how ASP does better than this in a response
driven environment. You could force a user to formally log off, but what if
they just close their browser, or their internet connection, or IE just
stops working on their PC (the most likely). This is also a problem with
inferring a current log in from the last hit by that user name.

Tim
www.chessish.com http://www.chessish.com 

--
From:  Ye Tun [SMTP:[EMAIL PROTECTED]]
Sent:  04 January 2002 02:21
To:  [EMAIL PROTECTED]
Subject:  application variable

Do we have application variable in PHP as in ASP?

I have a small database running with user name and password kept in
MySQL
database.  Once user is login, how can I prevent the same user from
logging in again?

REgards,

Ye


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