Jump to content
xisto Community
thedevil

Php And Session Talk about Session Handling in PHP

Recommended Posts

I have a problem in handling Session. When I log on to my site using the passwords and username that i have maintained in my database... After authentication, I start a session... but still when i again visit the admin page it asks me the username and password... I have added all the authentication and checking...

Share this post


Link to post
Share on other sites

How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable? And do you save the session id into database and check it from there? Oh and your code would be helpful too. Just explain it or have it properly commented.

Share this post


Link to post
Share on other sites

How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable?

 

And do you save the session id into database and check it from there?

Oh and your code would be helpful too. Just explain it or have it properly commented.

<{POST_SNAPBACK}>


actually I dont pass the session id in to pages but rely on get... moreover... i use code as such

 

session_start();$_SESSION['<somevariable>']='someting';
and use this variable to see if the person has logged in or not... as

session_start();$_SESSION['logged']=true;
in some other pages

if (isset($_SESSION['logged'])&&$_SESSION['logged']){//Some codes}else{// other codes}

Is this all right or am I just making it feel stupid...

please tell me better way to handle sessions and with code if any

Thank you

 

How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable?

 

And do you save the session id into database and check it from there?

Oh and your code would be helpful too. Just explain it or have it properly commented.

<{POST_SNAPBACK}>

HeLp me know about session id and its uses how to pass session id into pages... i have seen PHP self passing id through PHPSESSID in GET variable... how will I save the Session id??? and use it later on...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.