How to register session if register globals is off? I created a autorization form with sesion how I can make it work when register_global s is off
How to register session if register globals is off?
Collapse
X
-
-
register_global s allows you to access input variables without knowing where they came from. The part where you don't know where they came from is why it is deprecated in PHP 5.
And session_registe r() is deprecated because we have a clean $_SESSION superglobal to use. There's no reason for session_registe r to exist, and the only purpose it served was confusing beginners whenever their "sessions don't work."
To communicate with your session, make sure session_start() has been called, then then modify / read from the $_SESSION superglobal array.Comment
Comment