PHP Register Globals

May be security risk or mess up your code

http://us3.php.net/manual/en/security.globals.php

If register globals is on/off, you can change it by adding to apache .htaccess file:

php_flag register_globals off

OR

php_flag register_globals on

OR php code.

if (ini_get(register_globals)) { // if on, turn off
    $rg = array_keys($_REQUEST);
    foreach($rg as $var)
    {
        if ($_REQUEST[$var] === $$var)
        {
            unset($$var);
        }
    }
}
if (! ini_get(register_globals)) { // if off, turn on
    extract($_REQUEST, EXTR_OVERWRITE); 
   //If variable of same name exits, this will overwrite it;
}

You cannot set register_globals using http://www.php.net/ini_set.