For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > December 2006 > #39994 [Opn]: setcookie() docs don't say what to pass in "expire" to get a









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #39994 [Opn]: setcookie() docs don't say what to pass in "expire" to get a
jason191 at herkamire dot com

2006-12-31, 4:06 am

ID: 39994
User updated by: jason191 at herkamire dot com
-Summary: setcookie docs don't say what to pass to expires to get
a session cookie
Reported By: jason191 at herkamire dot com
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:

cleaned up bug title


Previous Comments:
------------------------------------------------------------------------

[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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com