Note If you want your script to work regardless of register_globals, you need to instead use the $ _SESSION array as $ _SESSION entries are automatically registered. If your script uses session_register (), it will not work in environments where the PHP directive register_globals is disabled .
Register_globals: Important: Starting from PHP 4.2.0, the default values of the option register_globals in PHP are set to OFF. PHP Community encourages you to rely on this option, with other alternatives, such as Superglobals.
Note This registers a global variable. If you want to register a session variable from within a function, you need to make sure to make it global using the global keyword or the $ GLOBALS [] array, or use the special session arrays as noted below .
Note if you are for using $ _SESSION (OR $ http_session_vars), do not use session_register (), session_Is_register (), and session_unregister ().