$_COOKIE shows cookie, INSPECT doesnt! why? -


can tell me why firebug inspect doesnt display cookies, while displayed $_cookie?

enter image description here

i use:

setcookie($name,$value,time()+999999, '/wp/3/',null,null,true);

you're passing true 7th parameter setcookie. per setcookie documentation, 7th parameter $httponly parameter. when set true, makes cookie accessible only via http, , nothing else--including scripts.

quote:

httponly

when true cookie made accessible through http protocol. means cookie won't accessible scripting languages, such javascript. has been suggested setting can reduce identity theft through xss attacks (although not supported browsers), claim disputed. added in php 5.2.0. true or false

you wither need pass false, or omit (since function defaults optional parameter false.)


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -