Kod
<?php
$LOGIN = "XXX";
$PASSWORD = "xxx";
function error ($error_message) {
echo $error_message."<BR>";
exit;
}
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW == "$PASSWORD" )) ) {
header("WWW-Authenticate: Basic entrer="Form2txt admin"");
header("HTTP/1.0 401 Unauthorized");
error("Musisz podac login i hasło!");
}
?>
$LOGIN = "XXX";
$PASSWORD = "xxx";
function error ($error_message) {
echo $error_message."<BR>";
exit;
}
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW == "$PASSWORD" )) ) {
header("WWW-Authenticate: Basic entrer="Form2txt admin"");
header("HTTP/1.0 401 Unauthorized");
error("Musisz podac login i hasło!");
}
?>
dzieki z gory...