note 72057 deleted from function.session-set-cookie-params by nlopess

From: Date: Sun, 21 Jan 2007 15:44:25 +0000
Subject: note 72057 deleted from function.session-set-cookie-params by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121991@lists.php.net to get a copy of this message
Note Submitter: trukin at gmail dot com ---- There is something that the php manual does not explain very well, the lifetime of the cookie is not the sum of time() + whatever you want. It should be whatever you want: CORRECT: $life = 60 * 60 * 24 * 30; // 30 days WRONG: $life = time() + (60 * 60 * 24 * 30);

« previous php.notes (#121991) next »