I used this code on an earlier version of php and everything worked fine.
When i switched to a new host, with php 5.0.4, it stopped working, it would just keep on asking for the log info and then stop and show Pleae try again message. Any ideas as to why this would be the case? :queasy: Thank you in advance.
include('config.inc.php');
if (!isset($_SERVER['PHP_AUTH_USER']))
{
header('WWW-Authenticate: Basic realm="Secure Login"');
header('HTTP/1.0 401 Unauthorized');
echo'Please try again...';
exit();
}
else if (isset($_SERVER['PHP_AUTH_USER']))
{
if (($_SERVER['PHP_AUTH_USER'] != $admin1) || ($_SERVER['PHP_AUTH_PW'] != $admin2))
{
header('WWW-Authenticate: Basic realm="Secure Login"');
header('HTTP/1.0 401 Unauthorized');
echo'Please try again...';
exit();
}
else
{
$pagetitle = 'Admin Panel';
include('adminheader.inc.php');