note 22388 added to function.session-set-cookie-params
| From: | steve at saturn5 dot com | Date: | Sun, 16 Jun 2002 07:54:38 +0000 |
| Subject: | note 22388 added to function.session-set-cookie-params | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31916@lists.php.net to get a copy of this message | ||
session_set_cookie_params didn't work at all, no matter how many times we yelled at the
computer. we wanted to update the session expiry time after login, so we used setcookie instead,
right after session_start:
$expiry = 60*60*24*100; // 100 days
session_start();
setcookie(session_name(), session_id(), time()+$expiry, "/");
if you can't get session_set_cookie_params to work, i recommend using setcookie instead. (yes,
you need time()+$expiry when using setcookie.)
--
http://www.php.net/manual/en/function.session-set-cookie-params.php
http://master.php.net/manage/user-notes.php?action=edit+22388
http://master.php.net/manage/user-notes.php?action=delete+22388
http://master.php.net/manage/user-notes.php?action=reject+22388