Bug #17974: setcookie with a variable in name don't work
| From: | obeaudet at videotron dot ca | Date: | Tue, 25 Jun 2002 15:52:09 +0000 |
| Subject: | Bug #17974: setcookie with a variable in name don't work | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12054@lists.php.net to get a copy of this message | ||
From: obeaudet@videotron.ca
Operating system: win32
PHP version: 4.2.1
PHP Bug Type: Unknown/Other Function
Bug description: setcookie with a variable in name don't work
I tried this command
$toto = "Temp";
setcookie("$toto[firstname]",$firstname);
and the cookie was not set but if I write this
setcookie("Temp[$toto]",$firstname);
it work
I found a workaround with this command
setcookie(setval($toto) . "[firstname]", $firstname);
--
Edit bug report at http://bugs.php.net/?id=17974&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17974&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17974&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17974&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17974&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17974&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17974&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17974&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17974&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17974&r=globals