I was browsing thru the http authentication method
given thru the header() function in the manual. I
tried it out but it's not giving me the pop-up window
asking me the username and password and is only
writing the text given in the code on the page.
I'm using win98 and otherwise use sun solaris. Does
this function work on these two OS?
I have to write a code that checks each time a user
enters a page, his previously entered user/pwd so as
to prevent anyone from entering the page if he knows
and writes the page's URL in the address bar. I've
used the same authentication method in ASP before for
the same. Can I use it in my OS using PHP?
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>";
}
?>

Regards,
T.Edison jr.

=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to