Das die admin.php "noch" nicht Passwort geschützt ist, weiß ich, ich wollte ja nur den login!
Aber nachdem ich die Daten eingegeben habe, kommt dieser fehler:
An der Admin kann das ja nicht liegen.
Warning: Cannot send session cache limiter - headers already sent (output started at C:\FoxServ\www\Re-Design\admin\index.php:7) in C:\FoxServ\www\Re-Design\admin\index.php on line 80
Ich mach mal den Ganzen Code rein:
<?php
$page_titel = 'Adminbereich - Einloggen';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Internetiv - <?php echo $page_titel; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<?php
if ($_GET["login"]=="index" {
?>
<table width="100%" height="100%" border="0">
<tr>
<td height="169"><table width="100%" height="100%" border="0">
<tr>
<td> </td>
<td><div align="center"><img src="../images/schriftzug_internetiv.gif" width="299" height="49"></div></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="471"><form action="index.php?login=send" method="post">
<table width="100%" height="100%" border="0">
<tr>
<td width="26%"> </td>
<td width="48%"><table align="center" width="100%" border="0">
<tr>
<td width="50%">Username:</td>
<td width="50%"><input type="text" name="name"></td>
</tr>
<tr>
<td>Passwort:</td>
<td><input type="password" name="pw"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Login"></td>
</tr>
<tr>
<td> </td>
<td></td>
</tr>
</table></form>
</td>
<td width="26%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
<?php
if ($_GET["login"]=="send" {
?>
<table width="100%" height="100%" border="0">
<tr>
<td height="169"><table width="100%" height="100%" border="0">
<tr>
<td> </td>
<td><div align="center"><img src="../images/schriftzug_internetiv.gif" width="299" height="49"></div></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="471"><table width="100%" height="100%" border="0">
<tr>
<td width="26%"> </td>
<td width="48%"><div align="center">
<?php
session_start();
$pw = '********';
$name = 'BNightSpeeder';
if ($_POST['pw'] == $pw && $_POST['name'] == $name)
$_SESSION['passwort'] = $pw;
echo 'Einloggen erfolgreich<br />';
echo 'Weiterleitung...';
echo '<meta http-equiv="refresh" content="5; url=admin.php" />';
} elseif (isset($_POST["pw"])) {
die('Falsche Angaben!';
}
?></div></td>
<td width="26%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>