czukoman20 Posted June 17, 2008 Share Posted June 17, 2008 define("COOKIE_EXPIRE", 30*60*24*100); 30*60*24*100 does this equal ten minutes? If it doesn't could someone give me the numbers to make it equal ten minutes. or explain how Link to comment https://forums.phpfreaks.com/topic/110624-cookie_expire/ Share on other sites More sharing options...
rhodesa Posted June 17, 2008 Share Posted June 17, 2008 depends on what you want. normally, when dealing with dates you are using the unix timestamp, which is in seconds. so you want the number of seconds in 10 minutes to add to it. define("COOKIE_EXPIRE", 60*10); //60 seconds per minute * 10 minutes but again...the above is arbitrary unless you tell us how it is used Link to comment https://forums.phpfreaks.com/topic/110624-cookie_expire/#findComment-567549 Share on other sites More sharing options...
czukoman20 Posted June 17, 2008 Author Share Posted June 17, 2008 setcookie("cookname", $this->username, time()+COOKIE_EXPIRE, COOKIE_PATH); setcookie("cookid", $this->userid, time()+COOKIE_EXPIRE, COOKIE_PATH); thats how its used.. soo Link to comment https://forums.phpfreaks.com/topic/110624-cookie_expire/#findComment-567552 Share on other sites More sharing options...
rhodesa Posted June 17, 2008 Share Posted June 17, 2008 yup time() returns seconds...what i posted before is what you want Link to comment https://forums.phpfreaks.com/topic/110624-cookie_expire/#findComment-567557 Share on other sites More sharing options...
czukoman20 Posted June 17, 2008 Author Share Posted June 17, 2008 ok thanks Link to comment https://forums.phpfreaks.com/topic/110624-cookie_expire/#findComment-567560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.