note 75296 added to function.setcookie
| From: | jcastromail at yahoo dot es | Date: | Tue, 22 May 2007 20:40:29 +0000 |
| Subject: | note 75296 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126829@lists.php.net to get a copy of this message | ||
You always can "emulate" a php setcookies invoking javascript.
<?php
echo "<script type='text/javascript'>/n";
echo "document.cookie='example=cookie'; /n";
echo "</script>/n";
?>
Using javascript to set a cookie allow you to change the cookie anytime (not only prior the body)
running javascript directly in the client side.
The disadvantage is the clients must support javascript.
----
Server IP: 69.147.83.197
Probable Submitter: 200.73.30.108
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- https://master.php.net/note/edit/75296
Del: integrated -- https://master.php.net/note/delete/75296/integrated
Del: useless -- https://master.php.net/note/delete/75296/useless
Del: bad code -- https://master.php.net/note/delete/75296/bad+code
Del: spam -- https://master.php.net/note/delete/75296/spam
Del: non-english -- https://master.php.net/note/delete/75296/non-english
Del: in docs -- https://master.php.net/note/delete/75296/in+docs
Del: other reasons-- https://master.php.net/note/delete/75296
Reject -- https://master.php.net/note/reject/75296
Search -- https://master.php.net/manage/user-notes.php