<?php session_start();
include('config.php');
$username = $_POST['username'];
$password = $_POST['password'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Вход</title>
</head>
<body>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td><table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<br>
<center><font size='4'><b>Админ панел</b></font></center>
<br>
<tr>
<td height="145">
<form name="form1" method="post" action="index.php">
Потребител:<br>
<input name="username" type="text" id="username">
<br>
Парола: <br>
<input name="password" type="password" id="password">
<br>
<br>
<input name="submit" type="submit" id="submit" value="влез">
<br>
<br>
</form>
<?php if($_POST['submit']){
if($username == $username2 && $password == $password2) {
session_register("username");
$_SESSION['username'] = $username;
echo "<font color=\"#ffffff\"><b>След 2 ще бъдете прехвърлен<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=home.php\"></b></font>";
} else {
echo "<center><b><font color='#ff0000'>Грешно потребителско име!</font></b></center>";
}
} ?></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>