#39994 [Opn->Bgs]: setcookie() docs don't say what to pass in "expire" to get a session cookie
| From: | bjori@php.net | Date: | Sun, 07 Jan 2007 13:06:10 +0000 |
| Subject: | #39994 [Opn->Bgs]: setcookie() docs don't say what to pass in "expire" to get a session cookie | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969374700@lists.php.net to get a copy of this message | ||
ID: 39994
Updated by: bjori@php.net
Reported By: jason191 at herkamire dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
setcookie() _sets_ cookies, it does not retrieve them.
Use the $_COOKIE autoglobal array.
Previous Comments:
------------------------------------------------------------------------
[2006-12-31 04:28:10] jason191 at herkamire dot com
cleaned up bug title
------------------------------------------------------------------------
[2006-12-31 04:25:37] jason191 at herkamire dot com
Description:
------------
The documentation for setcookie() here:
http://us2.php.net/manual/en/function.setcookie.php
does not specify what value to pass to the "expire" parameter to get a
session cookie.
It does say that the default value is a session cookie, but doesn't say
how to get this result by passing a value.
This is important information for two reasons:
1) I wrote a function that calls setcookie() and has a parameter for
the length of time the cookie will last. I would like to be able to
inform users what value they can pass to get a session cookie.
2) Perhaps there is a way, but I don't know how to pass the parameters
after "expire" without setting the "expire parameter. I'm sure many
others don't know how either.
One of the user comments says that he was able to get a session cookie
by passing 0 (zero), but I do not know if this works across different
PHP versions.
Thank you for your time.
Best regards,
- Jason Woofenden
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39994&edit=1