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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

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

Post 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
Last edited by anjanesh on Thu Aug 05, 2004 2:11 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_SERVER variables are basically read-only.. you should probably send them to the next page via sessions..
Post Reply