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

Home » Imported messages » comp.lang.php » Will this set or get a SESSION variable?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Will this set or get a SESSION variable? [message #180826] Wed, 20 March 2013 22:09 Go to previous message
daveh is currently offline  daveh
Messages: 18
Registered: March 2013
Karma:
Junior Member
I have the following code snippet:

if(in_array($name, $this->m_names))
{
$this->m_rules[$name][] = $rule;
return $_SESSION[$name];

}
In the entire script there does not appear to be any assignment to the
$_SESSION super global
so would it be fair to say that "return $_SESSION[$name];" not only
creates a session variable but returns it also? And what is it set
to?? It appears to me that $_SESSION[$name] = " " or possibly
something else. There is a bunch of $_SESSION[$somevariable]'s in the
code I'm looking at. The only reason I care is I would like to not
have to use any super globals at all but until I can figure out what
the original author was doing I'm stuck. I have successfully updated
his code (written in 2001) to work with php 5.3 but its not production
ready as register_globals has to be on and that's not a good thing. I
have googled and have seen no example of this type of use of $_SESSION
or $GLOBALS either.

If you need to see more code please email me directly


Thanks
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: APC issues: locking up all processes and lack of PHP 5.4 support
Next Topic: question about class getters
Goto Forum:
  

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

Current Time: Tue Nov 26 04:21:41 GMT 2024

Total time taken to generate the page: 0.05395 seconds