Hi,

As I belive, the sessions (session cookies) will expire after the browser has been restarted. So even if you put the session id in a cookie, after ten days you might have your old session id, but it would be delete from the server long ago. The server doesn't keep session for that log periods of time due to the fact it would take up a lot of hard disk... Session data, is stored on the server, cookies on the browser..

If you wish to use the cookies and keep them for 10 days on the user's computer you would just want to user normal cookies..

You would want to put this at the top of your page - before any output has been sent...
<?
setcookie("nameofcookie", "value of cookie", time()+600, "/");
?>


the time()+600 is in seconds 600 = ten mins, so if you wanted in to expire in ten days do the math.. :)
as for the "/" means that it will be sent to all your files..


hope this helps in some way... I'm no expert...
Adam


At 07:10 PM 3/22/2003 +0300, you wrote:
-> php-general.

I used such code:

    $exp = 60*60*24*10; # for ten days.
    session_set_cookie_params($exp);

  But it works wrong - cookies were removed right after i have rebooted.
  The other way is to put session id into the cookies, but...
  Isn't it the same?

Thank you.


Yours, L0vCh1Y [EMAIL PROTECTED]



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to