|
Posted by Jerry Stuckle on 10/31/06 17:42
Koncept wrote:
> In article <nbGdnTTol9Gf3drYnZ2dnUVZ_tOdnZ2d@comcast.com>, Jerry
> Stuckle <jstucklex@attglobal.net> wrote:
>
>
>>>// Note: This will destroy the session, and not just the session data!
>>>if ( isset( $_COOKIE[session_name()] ) )
>>> setcookie( session_name(), '', time() - 42000, '/' );
>>>
>>
>>This line will never do anything. The session_name is the value of the
>>cookie, not the name.
>
>
> That's incorrect. session_name() will return the key (*PHPSESSID* )
> which is then used as a key in the $_COOKIE superglobal to point to the
> current session id.
>
> http://php.net/session_destroy
>
> You will notice that the code I provided you is directly from the PHP
> docs and it is *not* incorrect.
>
> As you can see from the example below, each time I start a new browser
> session, I can, in fact, echo out what you suggest to be superfluous.
> Perhaps the answer to your problem lies in this simple oversight unless
> you have altered the value of "session.use_cookies" in your ini file.
>
> <?php
> session_start();
>
> if(isset($_COOKIE[session_name()])){
> echo $_COOKIE[session_name()];
> }
> // 72728376dfdd7f3de60f75111ace5a6e (first session - browser one)
> // 1ce309fbb3bbdd0d34ed2b73be8cbe5b (first session - browser two)
> ?>
>
My mistake. But I'm not the one having the problem. And this code
doesn't solve his real problem - which is page caching in Firefox.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|