![]() |
how to check if a user is logged in
hi
i want to check if the person acessing a page is logged in or not plz help |
...to what?
|
you have not asked a complete questions. There can be various ways. The one easy method is to create a session variable on the time of logon for that user on successful logon. Then where u need to check the logon information check session, and it will tell you the story. On logoff destroy session.
|
sorry
well what i want is that when a person logins that there should be some way to keep him logged in and if any page is accessed without login them i should be able to show acess denied message |
The method I suggested will work. Create session variable at the login time and check at page_load this session. If it is null there was no proper login else it was proper
|
may be (it will only work if the user is enabling cookies) you can make a cookie on his comp. with the username and password ofcourse encrypted and when the site loads it will check for that cookie if it is there it will take the username and password and log him in.
|
| All times are GMT -5. The time now is 1:36 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC