SESSION VARIABLE - REGISTERED

To register a variable, put the variable in the $_SESSION array. The variable must have the same name as the key in the array.

$_SESSION["XXXregisteredvar"]=$XXXregisteredvar;

To use a registered session variable, use the variable name directly ($XXXregisteredvar)

To unregister, use the unset PHP function as follow: unset($_SESSION["XXXregisteredvar"]))