• I wrote a simple class for updating visits and hits. I tell it to set a cookie, but it wouldn’t have any of it.

    setcookie(“wp_visited”, “y”, time()+60*60^24);

    I believe it’s something to do with WordPress. Has anyone had a similar problem before?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • dave_merwin

    (@dave_merwin)

    Have you found an answer to this? I can’t get a cookie I am trying to set to work either.

    Lemme know.

    ColdForged

    (@coldforged)

    If you post some details on your situation, Dave, we might be able to assist. For both of you, be certain your cookie setting calls are happening before any output is sent to the browser. That’s before <html>, <head>, anything.

    dave_merwin

    (@dave_merwin)

    Ok, I’ll create a new post in 1 hour.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t set cookies’ is closed to new replies.