= 2) { $method = strtoupper(func_get_arg(0)); if ( ($method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'FILES') && ($method != 'REQUEST') && ($method != 'ENV')) { die('The first argument of pt_register must be one of the following: SESSION, GET, POST, SERVER, COOKIE, FILES, REQUEST or ENV'); } $varname = "_{$method}"; global ${$varname}; for ($i = 1; $i < $num_args; $i++) { $parameter = func_get_arg($i); if (isset(${$varname}[$parameter])) { global $$parameter; $$parameter = ${$varname}[$parameter]; } } } else { die('You must specify at least two arguments'); } } /* fin pt_register() */ /* quand register_globals sera à off il faudra récupérer en automatique le strict minum : */ pt_register ("COOKIE", "PhpMyBibli-SESSID","PhpMyBibli-LOGIN","PhpMyBibli-SESSNAME","PhpMyBibli-LOGIN","PhpMyBibli-LANG"); pt_register ("SERVER", "REMOTE_ADDR","HTTP_USER_AGENT", "PHP_SELF", "REQUEST_URI", "SCRIPT_NAME");