note 74126 added to function.setcookie
| From: | mike at osu1 dot php dot net | Date: | Mon, 26 Mar 2007 16:00:28 +0000 |
| Subject: | note 74126 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124819@lists.php.net to get a copy of this message | ||
Be careful of using the same cookie name in subdirectories. Setting a simple cookie
<?setcookie("region", $_GET['set_region']);?>
both in the root / and for instance in this case /admin/ will create 2 cookies with different paths.
In reading the cookies back only the first one is read regardless of path.
----
Server IP: 87.124.64.96
Probable Submitter: 62.49.246.138
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- https://master.php.net/note/edit/74126
Del: integrated -- https://master.php.net/note/delete/74126/integrated
Del: useless -- https://master.php.net/note/delete/74126/useless
Del: bad code -- https://master.php.net/note/delete/74126/bad+code
Del: spam -- https://master.php.net/note/delete/74126/spam
Del: non-english -- https://master.php.net/note/delete/74126/non-english
Del: in docs -- https://master.php.net/note/delete/74126/in+docs
Del: other reasons-- https://master.php.net/note/delete/74126
Reject -- https://master.php.net/note/reject/74126
Search -- https://master.php.net/manage/user-notes.php