Re: _COOKIE[] unique?



newtophp2000@xxxxxxxxx wrote:
I may be getting confused over nothing here but ...

I was wondering if the _COOKIE global is unqiue to each visitor or is
it global across all visitor sessions?  If it is truly global on the
server side, is it possible that a cookie from one user's session may
corrupt another user's session?  How would I know which cookie goes
with which user session/browser?


$_COOKIE will only have cookies for current visitor, I believe they are sent over via http request :) Global in this context means that $_COOKIE is accessible from anywhere in the script, not that it has the cookies of all user sessions.



luph .



Relevant Pages

  • Re: Crypt datas
    ... sessions are stored on the SERVER side (look for session.save_path, ... usually your_httpd_path/tmp) and not on the client one as you wrote ... sessions have many pros compared to cookie based variable passing. ...
    (alt.php)
  • Re: Bug in forms authentication?
    ... Isn't the auth token saved as a cookie. ... You are right that sessions and form authentication are separated ... when I'm connecting from two IE browsers it _is ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Authorisation ids and passwords
    ... access protected directories then I assume it is using basic HTTP ... HTTP does not provide a method for a server ... If you use Sessions in PHP the sessionid has to be transfered from to client to the server and vise versa. ... This usually goes into a cookie. ...
    (comp.lang.javascript)
  • Re: Is it common to use session.use_trans_sid?
    ... they can just steal sessions. ... Just the contents of the session file, not the cookie. ... disabled browsers while not giving away security (since the security is ... probably savvy enough to make an exception for your site. ...
    (comp.lang.php)
  • Re: [PHP] input on sessions vs cookies
    ... the cookie data to retrieve user information.. ... to hijack sessions. ... is what PHP native sessions do. ... Why not use PHP native sessions? ...
    (php.general)