• Hello,
    I have spent hours trying to figure this out and cannot find any answers in the forums either…

    I have created different style sheets which I select using simple PHP GET links. These work fine. I wanted to create a cookie so that when the user changes page their browser automatically updates to what their cookie is set to.

    Here is the site: https://66.147.244.209/~peoplei1/website2/

    Things I have already tried:

    removing any spaces in my wp-config.php file,

    changing the permissions of the file to 644,

    setting the expiry, not setting the expiry,

    setting the path to COOKIEPATH, setting the path to “/”, not setting a path

    setting the domain to COOKIE_DOMAIN, setting the domain to 66.147.244.209, not
    setting a domain.

    I understand that any setcookie() has to appear before any page data, as in <html …>

    I have tried calling the cookie from functions.php,

    and I am rather frustrated!!

    Any advice would be much appreciated,
    Thanks in advance!

  • The topic ‘setcookie() not working’ is closed to new replies.