Hi - have a problem with some simple login code that works fine when I run it on my localhost server, but fails when I upload it to my ISP's server. (Please don't criticise the very basic security - there's a reason!). Code is as follows: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <?php //An array of allowed users and their passwords include 'UserDtls.php'; //If there's no authentication header, exit if (!isset($_SERVER['PHP_AUTH_USER'])) { header('HTTP/1.1 401 Unauthorized'); header('WWW-Authenticate: Basic realm="CCPAdmin"'); exit('This page requires authentication'); } //If the username doesn't exist, exit if(!isset($users[$_SERVER['PHP_AUTH_USER']])) { header('HTTP/1.1 401 Unauthorised'); header('WWW-Authenticate: Basic realm="CCPAdmin"'); exit('You are not authorised to view this page!'); } //If the password doesn't match correctly, exit if($users[$_SERVER['PHP_AUTH_USER']] != $_SERVER['PHP_AUTH_PW']) { header('HTTP/1.1 401 Unauthorised'); header('WWW-Authenticate: Basic realm="CCPAdmin"'); exit('You are not authorised to view this page!'); } ?> [/code] On localhost, everything works perfectly; on ISP server, I always get the first error message - "This page requires authentication". I've checked the sticky on HEADERS etc but I don't think that's it. Any ideas, please? The [b]include[/b] file is just an array declaration with username/password pairs - but I don't get that far! Phil