note 20639 modified in function.setcookie by john
| From: | john@php.net | Date: | Sat, 30 Nov 2002 16:33:30 +0000 |
| Subject: | note 20639 modified in function.setcookie by john | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40169@lists.php.net to get a copy of this message | ||
If you already have a variable set with the same name you are about to assign a cookie to, the
cookie will not set AND you will not get an error message.
For example, if you have a login box that has an input field called "username," post that
value to a user authentication page and then set a cookie called "username" the cookie
won't set.
Use different names and you are back in action.
[Editor's Note: This should only apply if register_globals is on. Otherwise, the cookie should
be available in in the superglobal array $_COOKIE]
--was--
If you already have a variable set with the same name you are about to assign a cookie to, the
cookie will not set AND you will not get an error message.
For example, if you have a login box that has an input field called "username," post that
value to a user authentication page and then set a cookie called "username" the cookie
won't set.
Use different names and you are back in action.
http://www.php.net/manual/en/function.setcookie.php