Regarding clearing of session when you logout
Posted: Wed Feb 22, 2006 5:15 am
Hi,
i face some problem in my code.When i logout from the application i clear session variables using the following code:
setcookie ("Loggedin", "nobody",time()+3600);
session_unregister("uname");
session_unregister("upass");
session_unregister("ugroup");
I have a relogin option that agains take me to the home page.
The problem i face is,when i relogin with the loginid it doesnot logs in for the first time. it requires 2 time login when i login with the a different id from which i have logged out.
If i tired to login withe the same id as my logout it works fine.
If am not clear,
For example i am logging with Userid as:X
logging out and again logging with X it works fine.
But with logging as Y it requires 2 times to login.
Can u please help me in this problem.
I feel the seesion variables are not cleared...
i face some problem in my code.When i logout from the application i clear session variables using the following code:
setcookie ("Loggedin", "nobody",time()+3600);
session_unregister("uname");
session_unregister("upass");
session_unregister("ugroup");
I have a relogin option that agains take me to the home page.
The problem i face is,when i relogin with the loginid it doesnot logs in for the first time. it requires 2 time login when i login with the a different id from which i have logged out.
If i tired to login withe the same id as my logout it works fine.
If am not clear,
For example i am logging with Userid as:X
logging out and again logging with X it works fine.
But with logging as Y it requires 2 times to login.
Can u please help me in this problem.
I feel the seesion variables are not cleared...