what if the Global Registers is Off, how to I do the variables thing?
is it only $HTTP_POST_VARS[‘var’] or their are some other shorter ways???
thanks again…
what if the Global Registers is Off, how to I do the variables thing?
is it only $HTTP_POST_VARS[‘var’] or their are some other shorter ways???
thanks again…
<?php
/**
* Support for register_globals Off code
**/
$raw = phpversion();
list($v_Upper,$v_Major,$v_Minor) = explode(".",$raw);
if (($v_Upper == 4 && $v_Major < 1) || $v_Upper < 4) {
$_FILES = $HTTP_POST_FILES;
$_ENV = $HTTP_ENV_VARS;
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_COOKIE = $HTTP_COOKIE_VARS;
$_SERVER = $HTTP_SERVER_VARS;
$_SESSION = $HTTP_SESSION_VARS;
$_FILES = $HTTP_POST_FILES;
}
?>
save as “globalsfix.php” (or whatever name you want) and then INCLUDE in your other scripts.
code once, use many
wow! i think i get it…
can u give me an example of use it? like when i use the variable, how?
$_post[‘Var’] = “this is a var”;
thanks
print $_post[‘Var’];
nice! thanks
*Originally posted by eyezberg *
if (($v_Upper == 4 && $v_Major < 1) || $v_Upper < 4)
I could be totally off here, but shouldn’t you be setting the $v_Major to < 2.
I thought register_globals was turned off in 4.2.
…maybe I just need another cup of coffee.
should be 2
change 2 2 lol
good eyeZ !
kool! now i can do $_POST[‘var’] isntead of typing the looonnggg $HTPP_POST_VARS[‘var’]…
sweet
:: Copyright KIRUPA 2024 //--