Re: HTTP authentication

From: Date: Thu, 15 Feb 2001 13:20:54 +0000
Subject: Re: HTTP authentication
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39895@lists.php.net to get a copy of this message
On Wed, Feb 14, 2001 at 11:07:46PM -0800, Thomas Edison Jr. wrote: > The code I'm entering is: > > <?php > if(!isset($PHP_AUTH_USER)) { > Header("WWW-Authenticate: Basic realm=\"My Realm\""); > Header("HTTP/1.0 401 Unauthorized"); > echo "Text to send if user hits Cancel button\n"; > exit; > } else { > echo "Hello $PHP_AUTH_USER.<P>"; > echo "You entered $PHP_AUTH_PW as your password.<P>"; > } > ?> I'm not sure what is wrong. I copied and pasted this onto my system and it works just fine. -- Jason Stechschulte jpstech@unoh.edu -- Soitainly. I was assuming that came with the OO-ness of it. -- Larry Wall in <199710011802.LAA21692@wall.org>

« previous php.general (#39895) next »