using PHP4, i have found that $PHP_SELF doesnt work if called inside a function.
e.g
function test () {
echo $PHP_SELF;
}
above wont give the current file name, so i tried using a global variable, which is declared as $PHP_SELF outside the function.
e.g.
GLOBAL $action_self;
$action_self = $PHP_SELF;
function test () {
GLOBAL $action_self;
echo $action_self;
}
and above worked.