pedjasmek Posted November 6, 2007 Share Posted November 6, 2007 Expire time in the cookie I use is next year but it expires few minutes later.Is there some setting(s) I'm missing? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted November 6, 2007 Share Posted November 6, 2007 post code example setcookie("TestCookie", "blar", time()+3600); /* expire in 1 hour */ Quote Link to comment Share on other sites More sharing options...
pedjasmek Posted November 6, 2007 Author Share Posted November 6, 2007 Is this code wrong: setcookie('username',$_SESSION['korisnicko_ime'],mktime(12,0,0,12,31,2008)); Quote Link to comment Share on other sites More sharing options...
revraz Posted November 6, 2007 Share Posted November 6, 2007 Not sure if you can use mktime in a cookie like that. I've always done it with time () Easy way to do it is to multiply seconds * minutes * hours * days So time()+60 * 60 * 24 * 365); would equal 1 year. 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.