I did search the archives and although I saw many posts on this subject they didn't seem to have the answer to my problem. I'm sorry if I missed something.
My problem is that I'm implementing user authentication using functions and the only way to get it to work is if the authentication variable is global and I import it into the function that authorize the user.
In other words, I can't simply use this in my function:
{
global $HTTP_SESSION_VARS;
session_register('user_ok');
$HTTP_SESSION_VARS['user_ok'] = 1;
}
but have to create and session_register the variable in the global scope, import into the function
(global $user_ok, $HTTP_SESSION_VARS😉
and do $user_ok = 1; inside the function.
The manual says to avoid registering globals, but I don't see how to use them inside functions.
Therefore I can't turn register_globals off.
Help? Please?
Thanks.