note 55234 added to function.setcookie
| From: | Pininquedepinonyesobrin at osu1 dot php dot net | Date: | Thu, 28 Jul 2005 08:39:38 +0000 |
| Subject: | note 55234 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92612@lists.php.net to get a copy of this message | ||
Just to be thorough and complete my previous comment, the snipet would be:
<SCRIPT language="JavaScript">
<!--
document.cookie = "cookie_test=test";
if(!document.cookie ){
document.write("What ever HTML worning you may wont to put <? what ever PHP code you may
want to place here ?>");
}
-->
</SCRIPT>
<NOSCRIPT>
Your browser is too old or you are too paranoid to allow JavaScript to be executed.
Or any other HTML you wisht to place here.
</NOSCRIPT>
This takes care of the possibility that the client does not allow for cookies, or that it does not
allow for JavaScript and you can not check if cookies are allowed.
This should be very well known by everyon but sume time we forget the basics and I think is worth
remembering them.
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55234
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55234&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55234&report=yes
Search -- http://master.php.net/manage/user-notes.php