Hi,
I've read the official manual on session handling, as well as the section in
"PHP Developer's Cookbook" (2/e, Hughes & Zmievski). But I still cannot
make a cookie persist across browser sessions -- very frustrating.
I use PHP 4.1.1 running as a CGI in Win32.
Here is a snippet:
======================
$lifetime = time() + 8600;
session_name('app');
session_start();
....
session_set_cookie_params ($lifetime, '', '.site.com');
// session_get_cookie_params returns the expected values
....
$_SESSION['userdata'] = $data;
// Browser, however, says the cookie is due to expire at the end of
session (and it does).
======================
What am I missing here? Thanks.
Also, BTW, I notice the above-mentioned book says session_set_cookie_params
returns o (failure) or 1 (success), but the official documentation says it
returns nothing (void). Is the book in error or is it describing an earlier
version?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php