The window with the authentication box comes up fine but i
basically don't know what username and password into the box. i thick its what is hardcoded in the code but it doesn't work - can you explain this to me am i doing something wrong. if i am how do i set the username and password so that it does work please. PHP:
PHP:
--------------------------------------------------------------------------------
Code: Select all
<?php # authentication.php
//This page handles the authentication for the admin pages
$authorized = FALSE; // Initialise a variable
//Check for authentication submission.
if ( ( isset($_SERVER['PHP_AUTH_USER']) AND isset($_SERVER['PHP_AUTH_PW'])) ) {
if ( ($_SERVER['PHP_AUTH_USER'] == 'CC006200') AND ($_SERVER['PHP_AUTH_PW'] == 'arsenal') ) { // if the correct values were entered ...
$authorized = TRUE;
}
}
//If they haven't been authorised, create the pop-up window.
if (!$authorized) {
header('WWW-Authenticate: Basic realm="Administration"');
header('HTTP/1.0 401 Unauthorized');
// For cancellations
}
?>