Page 1 of 1

[SOLVED] - Setting $_SERVER['PHP_AUTH_USER']

Posted: Thu Aug 05, 2004 12:22 pm
by anjanesh
Hi
I have :
a.php:
I get user and pass and check for validity from db and if correct set $_SERVER['PHP_AUTH_USER']=$_POST['User']; and then header("Location:b.php")
b.php:
echo $_SERVER['PHP_AUTH_USER']; - it gave PHP_AUTH_USER is undefined.

When I printed the content of $_SERVER in b.php, it shows
AUTH_PASSWORD -
AUTH_TYPE -
AUTH_USER -

Any ideas, suggestions ?
Thanks

Posted: Thu Aug 05, 2004 12:24 pm
by feyd
$_SERVER variables are basically read-only.. you should probably send them to the next page via sessions..