I don't understand the random formatting--formatting is actually important, as it makes understanding overall structure really easy:While it's hard to tell, you might be setting the user to something even if they're not a new user.
But I'm not clear on what the question is since you didn't actually ask one--were you asking if this was one way to do it?
it is simple thing.
if user log into system and after sometime he try to come back.
after 10 minutes.
then already session is there .so he doesn't need to ask username of password.
automatically goes to the welcome page.
but if there is no any session actively he need to provide username and password to log in.
i need to impliment this facility.
can anyone help me?
new user means there is no any session related to this user available.
so we need to check database tables for authentication.
old user means there is session available for this user.so no need to check databse.