Devine Posted July 30, 2007 Share Posted July 30, 2007 "Forever" cookies.. How can I do that? Quote Link to comment Share on other sites More sharing options...
ChadNomad Posted July 30, 2007 Share Posted July 30, 2007 What's the point? Quote Link to comment Share on other sites More sharing options...
jitesh Posted July 30, 2007 Share Posted July 30, 2007 For persistent cookie You must have to give expire time. You can set it for many years. Example : 100 Years setcookie('name','value',time()+100*365*24*60*60); Quote Link to comment Share on other sites More sharing options...
Devine Posted July 30, 2007 Author Share Posted July 30, 2007 I want to offer the possibility of being "logged in forever".. (aslong as they dont delete the cookies from their browser. Quote Link to comment Share on other sites More sharing options...
steelmanronald06 Posted July 30, 2007 Share Posted July 30, 2007 make the cookie time expire like so: $lp = 0; $setup = 100; while ($lp < 100) { $setup = $setup * 100; $lp++; } setcookie("TestCookie", $value, $setup); Quote Link to comment Share on other sites More sharing options...
Devine Posted July 30, 2007 Author Share Posted July 30, 2007 For persistent cookie You must have to give expire time. You can set it for many years. Example : 100 Years setcookie('name','value',time()+100*365*24*60*60); And it won't be taken deleted as soon as they close their browser right? Quote Link to comment Share on other sites More sharing options...
jitesh Posted July 30, 2007 Share Posted July 30, 2007 And it won't be taken deleted as soon as they close their browser right? Yes. It will not be deleted up to set expire time. Quote Link to comment Share on other sites More sharing options...
steelmanronald06 Posted July 30, 2007 Share Posted July 30, 2007 well, it depends on browser settings. If they have it to delete cookies, clear history after 0 days, etc like I do, then everytime they close the browser their cookies and history are deleted. Quote Link to comment Share on other sites More sharing options...
steelmanronald06 Posted July 30, 2007 Share Posted July 30, 2007 sorry. we keep posting at the same time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.