www.webdeveloper.com
Results 1 to 1 of 1

Thread: Problem with Cookies

  1. #1
    Join Date
    Oct 2005
    Posts
    11

    Problem with Cookies

    I have a php app that is to set/update a cookie.
    I am using
    setcookie("hdclimit", $_GET['CLIMIT'], time() + (3600 * 24 * 364) + 5,"/", ".v4.dir.com");
    to set the cookie.

    and then
    if (isset($_COOKIE[hdclimit]))
    { print("cookie has been set<br>");
    $default_climiter = $_COOKIE[hdclimit];
    }
    else { print("The cookie wasn't set");$default_climiter = "10";}


    to determine whether or not the cookie has been set.

    The first time I enter the web page, I receive the not set message and upon exiting I can find the cookie file in the C:\Documents and Settings\username\Cookies directory.

    The second time I enter the web page, I receive the cookie found message and the cookie value is used.

    When I exit from the web page, the cookie is gone from the C:\Documents and Settings\username\Cookies directory.

    The 3rd time I enter the web page, I again receive the cookie not found message.

    What causes this cookie to disappear on me. Is it not just supposed to update?

    TIA
    D
    Last edited by moohuey; 10-26-2005 at 08:04 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles