Web Analytics Made Easy -
StatCounter cookies - CodingForum

Announcement

Collapse
No announcement yet.

cookies

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cookies

    creating a cookie with the code below only allows me to access that cookie with scripts in files within the same directory. why?


    setcookie("usernameloginforum", "$username", time() + 777600);
    setcookie("passwordloginforum", "$password", time() + 777600);
    ~Designer's Toolz~

  • #2
    are you calling the cookie by $_COOKIE['name'] ?

    Comment


    • #3
      You're not putting a path in the cookie

      setcookie ( name , value , expire , path , domain)

      If path is set to / then iot works across your whole site, if it's set as /foo/bar/ then it'll only work in the bar directory

      Comment


      • #4
        I'm not sure I entirely understand your question, but I think the answer is: "For security reasons."

        I don't think you should be allowed to access cookies you didn't create and access directories you don't have any business with.

        What are you wanting to do? Perhaps someone on this board may be able to help you accomplish that task.

        Sadiq.

        Comment


        • #5
          What nightfire said. (thanks man)
          ~Designer's Toolz~

          Comment

          Working...
          X