Pouzivani session_register se nedoporucuje, viz php manual, mam radeji prime odkazovani v poli, mam pak pocit, ze mam veci vic pod kontrolou

Kód:
<?php 
// Use of session_register&#40;&#41; is deprecated 
$barney = "A big purple dinosaur."; 
session_register&#40;"barney"&#41;; 

// Use of $_SESSION is preferred, as of PHP 4.1.0 
$_SESSION&#91;"zim"&#93; = "An invader from another planet."; 

// The old way was to use $HTTP_SESSION_VARS 
$HTTP_SESSION_VARS&#91;"spongebob"&#93; = "He's got square pants."; 
?>
Session variables: $_SESSION
Note:
Introduced in 4.1.0. In earlier versions, use $HTTP_SESSION_VARS.

An associative array containing session variables available to the current script. See the Session functions documentation for more information on how this is used.

This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_SESSION; to access it within functions or methods, as you do with $HTTP_SESSION_VARS.

$HTTP_SESSION_VARS contains the same information, but is not an autoglobal.
A jeste k session_unregister

If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable. Do not unset() $_SESSION itself as this will disable the special function of the $_SESSION superglobal.
Atd proste viz. php manual