When I do the echo, it prints the variable, not what it's stored in it. I tried $PHP_AUTH_USER and PHP_AUTH_PW but it just returns blank when I print it.
<?php
session_start();
include('functions.php');
if ($_SESSION['auth'] == 'true') {
PrintTop();
ListInfos();
PrintEnd();
exit;
} else {
if ((!isset( $_SERVER['PHP_AUTH_USER'] )) && (!isset($_SERVER['PHP_AUTH_PW'])) && ( $_SERVER['PHP_AUTH_USER'] != 'CreativeClan' ) && ( $_SERVER['PHP_AUTH_PW'] != 'Vanilla' ) ) {
header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
echo '$_SERVER["PHP_AUTH_USER"] is the username, and $_SERVER["PHP_AUTH_PW"] is the password.';
exit;
} else {
$_SESSION['auth'] = 'true';
PrintTop();
ListInfos();
PrintEnd();
exit;
}
}
?>