how to maintain the cookies for a long duration of time even if the user logout from the site and when user login next time the earlier set of cookies should be there
Asked
Active
Viewed 1,272 times
0
-
See this: http://stackoverflow.com/questions/532635/javascript-cookie-with-no-expiration-date – Tomasz Kowalczyk Sep 13 '10 at 13:01
1 Answers
0
If you just want cookies that experiences after a given duration you just use that:
setcookie(name, value, expire, path, domain);
where expire
can be for example time()+60*60*24*$days
.

Cedric H.
- 7,980
- 10
- 55
- 82
-
he wants cookie that has no expiration date or very long expiration date, so it is no help. – Tomasz Kowalczyk Sep 13 '10 at 13:05
-
Maybe, but that's not clear at all... 'for a long duration of time even if the user logout from the site and when user login next time the earlier set of cookies should be there', nothing is said about 'no expiration date'... – Cedric H. Sep 13 '10 at 13:07