Well,
I have read in manual that its not possible to save Session as long as Visiter stay in his Browser Window. Any limit of session time have to expire before the end of the BROWSER session.
In Session we must have to set an expiry time of the Session. We can increase the time to 60x24 minuntes for one day expiry in php.ini but after that it again has to expire if browser not closed.
COOKIE system based on more Parameters(Options). We can set Cookie expire after certain minuntes or be active untill unless the visiter close his browser.
if you set a cookie expiration to NULL, it will be deleted at the end of the BROWSER session. As soon as you close that browser window (or the whole browser program, depending on the browser), the cookie is deleted. This is different from a PHP session. A PHP session is data stored on the SERVER, and linked to a user by means of a session cookie.
Some times also maintain PHP sessions without cookies... by appending the session_id to each and every internal UR L (which us very tedious from a programming standpoint).
PHP sessions have expiration dates. If you don't set one, it is usually 30 minutes. After a PHP session is expired or destroyed, the session cookie it set on the user's computer is worthless, because it refers to a session that no longer exists. As well, the cookie contains no user info (user name, encrypted password, etc), only the worthless PHP session id. Of course, a PHP session cookie can have its own expiration date, but it would be silly to set it to expire before the PHP session expires.
If you changed that expiration value to NULL, the cookie would be deleted every time you closed your browser (really good for the paranoid).
Sincerely,
Imran Khalid (PHP Web Developer)
http://imrankhalid.5u.com
Email: imranlink@hotmail.com
...........................................................