Ich bin zur Zeit dabei eine "Profilverwaltung" einzurichten, in der sich jeder User einloggen und ausloggen kann.
Mein Problem ist zur Zeit nur, dass das System funktioniert, aber immer 2 oder 3 Fehlermeldungen angezeigt werden und ich diese nicht wegbekomme.
Hier sind diese:
Warning: Cannot send session cookie - headers already sent by (output started at /var/www/web0/html/Homepage/TEST/aufbau.php:10) in /var/www/web0/html/Homepage/TEST/logout.php on line 3
Warning: Cannot send session cache limiter - headers already sent (output started at /var/www/web0/html/Homepage/TEST/aufbau.php:10) in /var/www/web0/html/Homepage/TEST/logout.php on line 3
Warning: Cannot add header information - headers already sent by (output started at /var/www/web0/html/Homepage/TEST/aufbau.php:10) in /var/www/web0/html/Homepage/TEST/logout.php on line 6
Warning: Cannot send session cache limiter - headers already sent (output started at /var/www/web0/html/Homepage/TEST/aufbau.php:10) in /var/www/web0/html/Homepage/TEST/logout.php on line 3
Warning: Cannot add header information - headers already sent by (output started at /var/www/web0/html/Homepage/TEST/aufbau.php:10) in /var/www/web0/html/Homepage/TEST/logout.php on line 6
Durch die checkLogin.inc.php wird überprüft, ob der User eingeloggt ist.
Hier sind die beiden Dateien:
aufbau.php
PHP-Code:
<html>
<head>
<title>Profil-Verwaltung</title>
</head>
<body bgcolor="#FFFF00">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<td></td>
<td bgcolor="#FFFF00" width="800" height="500">
<table width="800" height="500">
<tr><td height="1"><?php include("header.php") ?></td></tr>
<tr><td>
<table>
<tr><td width="150"><?php include("navigation.php") ?></td>
<td width="600">
<?php include("seiten.php") ?>
</td></tr>
</table>
</td></tr>
<tr><td height="1"><?php include("footer.php") ?></td></tr>
</table>
</td>
<td></td>
</table>
</body>
</html>
checkLogin.inc.php
PHP-Code:
<?php
session_start();
if( !$_SESSION['loggedIn'] ) {
header( 'Location: ./loginformular.php' );
exit();
}
?>

Einen Kommentar schreiben: