FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Session variables..
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Session variables.. [message #177921 is a reply to message #177918] Fri, 27 April 2012 08:52 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 27.04.2012 08:36, schrieb karan kumar:
> PLZ take a look and Provide for a solutionn
>
>
> code is....-->
>
>
> <?php
> session_start();
> $_SESSION['psid']=1111;
> echo $_SESSION['psid'];
> $psid=9999;
> echo " ".$_SESSION['psid'];
> ?>
>
> the output is-->1111 1111
>
> but if you reload the page 2nd time then output changes to---> "1111 9999"
>
> and if you write session_destroy() at the end then the output remains unchanged..
> how come local variable psid is overwritten over $_SESSION['psid'].??

to session_destroy():

you will have your session variables until the end of script. On the next request
they will be gone. The session id remains the same, but the session data is gone.

I find it a bit strange, this function cleans up after you.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: const var, self:: or static::
Next Topic: Removing specific array items
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 02:25:39 GMT 2024

Total time taken to generate the page: 0.04552 seconds