note 30300 added to function.setcookie
| From: | ppegah at yahoo dot com | Date: | Thu, 13 Mar 2003 13:25:57 +0000 |
| Subject: | note 30300 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45214@lists.php.net to get a copy of this message | ||
Here is a very simple way to finde out if the browser supports cookie:
setcookie("check_cookie", "on", time()+(60));
$refreshed= "set";
if (!isset($refreshed)) {
//forcing the browser to reload
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0\">\n";
}
if (!isset($check_cookie)) {
//Browser does not accepting cookies
//Do something
} else {
//The browser accepts cookies
//Do something else
}
I hope it helps somebody :-)
Reagrds
Kayvan
--
http://www.php.net/manual/en/function.setcookie.php
http://master.php.net/manage/user-notes.php?action=edit+30300
http://master.php.net/manage/user-notes.php?action=delete+30300
http://master.php.net/manage/user-notes.php?action=reject+30300