Quote:
Originally Posted by pradeepjain
okie you mean to say that
ini_set('session.cookie_lifetime', 0);
will not create any cookie rite.
No, that's not right.
To quote
the manual:
Quote:
Originally Posted by php.net
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0.
Also note that the cookie this quote talks about is in no way related to the "Remeber me" feature we are talking about. This cookie is used by PHP to maintain the server-side session.
A "Remember me" feature needs to be coded by the the developer (you, that is). It is not something PHP does automatically. (Although your CMS might, I don't know.)
The cookies used for that need to be created manually, using the
setcookie function, and they also need to be fetched and validated. And if they check out, the user needs to be logged in (the session needs to be created, that is).
Quote:
Originally Posted by pradeepjain
and when we say remember me...wht exactly is stored in cookie in browser..name=> passwd / session ID
Depends on your implementation.
This is typically the ID of the user and some sort of string that can be used to validate that this is in fact the user.
Like say, the user name, his password hash, and a bunch of "random" constants, all put together in a single SHA1 hash.
No matter how you implement this, you just need to make sure the string can be re-created by the server later, so it can be verified.
And keep in mind that cookies are in no way a secure place to store data, so make sure you don't put any data in a cookie you don't want anybody to see.
If you need to store stuff like user information, at least make sure it is hashed and/or encrypted in a way that won't allow somebody to steal the info.