Hi ive tried this script and it doesnt seem to work for me. I have typed exactly the same username and password in the script..it keeps on asking for the username and password..pls help...cud this be due to a setting in the php or apache server...am using php 4.3 and apache 1.3.33...the code is <?php if (!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != "admin") || ($PHP_AUTH_PW != "abc123")) { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else { echo " <P>You're authorized!</p> "; } } ?> cheers... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php