Добрый день.
Сделал админку на сайте состоит из страницы авторизации registrate.html:
<DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Страница Авторизации</title>
<link rel="icon" href="../favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" media="screen and (min-width:1024px)" href="../css/single.css"/>
<link rel="stylesheet" type="text/css" media="screen and (max-width:1023px)" href="../css/adm-mobile.css"/>
</head>
<body data-page="single-list" class="list">
<header class="wrap">
<div class="menu-container">
<p>Авторизация:</p>
<form action="..//administrate/avt.php" method="post">
<input class="input-text" name="login" placeholder="Логин">
<input class="input-text"type="password" name="password" placeholder="Пароль">
<input class="add-btn" type="submit" value="Войти">
</form>
</div>
</header>
<main>
</main>
<footer></footer>
<script></script>
</body>
и соответственно скрипт avt.php
<?php
$login = $_POST['login'];
$pas = $_POST['password'];
if ($login == '********' && $pas == '**************')
{
session_start();
$_SESSION['admin'] = true;
$script = 'adminpanel.php';
}
else
$script = 'registrate.html';
header("Location: $script");
ну и сама страница adminpanel.php с шапкой
<?php
header('Content-type: text/html; charset=utf-8');
session_start();
if (! $_SESSION['admin']);
header('Location: avt.php');
?>
сегодня вдруг стала вылетать ошибка :
Notice: Undefined index: login in avt.php on line 2
Notice: Undefined index: password in avt.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at avt.php:2) in avt.php on line 12
Подскажите как исправить?