1

setcookie("samplecookiename", "sampledata", time()+3600*24*10, '/', 'domain.com', TRUE, TRUE);

This syntax sets the cookie in name samplecookiename with data sampledata with expiry date perfectly. But still I see the cookie is available for all type of connections. What is the issue? The PHP version used in the website is 5.3.27 and in localhost 5.3.8.

Any ideas?

enter image description here

Update: The cookie is also accessible by scripts too. Means the cookie is not set as HTTP only.

enter image description here

Sarvap Praharanayuthan
  • 4,212
  • 7
  • 47
  • 72

1 Answers1

-2

Maybe you are using Chrome as your browser.

redwud
  • 174
  • 3
  • 8