LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   problems with a global variable (https://www.linuxquestions.org/questions/programming-9/problems-with-a-global-variable-335786/)

javier_ccs 06-21-2005 11:56 AM

problems with a global variable
 
hello,

i have i little problem, i need to pass over a global variable($PHP_AUTH_USER) to a page.

this variable is set once the user log in, and the problem is that the only way i can set the variable there is by printing it in an echo

if i erase the echo then $PHP_AUTH_USER goes away...

anybody?

Hko 06-21-2005 12:11 PM

Re: problems with a global variable
 
Quote:

Originally posted by javier_ccs
i have i little problem, i need to pass over a global variable($PHP_AUTH_USER) to a page.
You need to use $_SERVER['PHP_AUTH_USER']
instead of $PHP_AUTH_USER

javier_ccs 06-21-2005 12:18 PM

do you mean that i should replace it directly on the $login?
PHP Code:

echo $PHP_AUTH_USER;
$login $PHP_AUTH_USER



All times are GMT -5. The time now is 05:22 PM.