rss search

How to Check Cookie using PHP?

line How to Check Cookie using PHP?

If you use JavaScript, it won’t work on the Internet Explorer because IE got a bug.

      setcookie ('test', 'test', time() + 60);
      if (!isset($test) && !isset($_COOKIE['test'])
          && !isset($HTTP_COOKIE_VARS['test'])) {
          echo "Cookie is not working";
      } else {
          echo "Cookie is working";
     }

Leave a Reply

You must be logged in to post a comment.