How to fix the
Don't use it. The description says:
Register one or more global variables with the current session.
Two things that came to my mind:
$_SESSION['var'] = "value".
See also the warnings from the manual:
If you want your script to work regardless of
register_globals, you need to instead use the
$_SESSIONentries are automatically registered. If your script uses
session_register(), it will not work in environments where the PHP directive
This is pretty important, because the
register_globals directive is set to
False by default!
This registers a
globalvariable. If you want to register a session variable from within a function, you need to make sure to make it global using the
globalkeyword or the
$GLOBALSarray, or use the special session arrays as noted below.
If you are using
$HTTP_SESSION_VARS), do not use