Ich habe mal genanntes tout ausprobiert...
nur bekomme ich beim anmelden folgenden fehler...
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/htdocs/kirktos/main.php:7) in .../login.php on line 35
hier mein script:
<html>
<head>
<title>login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#333333" text="#CCCCCC">
<p> </p>
<p align="center"><font size="+2" face="Arial, Helvetica, sans-serif"><strong>SUBsP/\Ce
Login:</strong></font></p>
<form method="post" action="">
<div align="center">
<p><font face="Arial, Helvetica, sans-serif"><strong>
<select name="select">
<option value="1">Test</option>
</select>
User:
<input type="text" name="username">
Passswort:
<input name="userpass" type="password" id="userpass">
::::>
<input type="submit" name="Submit" value="LOGIN">
>>></strong></font> </p>
<p><font face="Arial, Helvetica, sans-serif"><strong><a href="main.php?id=registrieren.html">>>
Registrieren <<</a></strong></font></p>
</div>
</form>
<?
session_start();
include 'sessionhelpers.inc.php';
if (isset($_POST['login']))
{
$userid=check_user($_POST['username'], $_POST['userpass']);
if ($userid!=false)
login($userid);
else
echo 'Ihre Anmeldedaten waren nicht korrekt!';
}
if (!logged_in())
echo '<form method="post" action="">
<div align="center">
<p><font face="Arial, Helvetica, sans-serif"><strong>
<select name="select">
<option value="1">Testuni</option>
</select>
User:
<input type="text" name="username">
Passswort:
<input name="userpass" type="password" id="userpass">
::::>
<input type="submit" name="Submit" value="LOGIN">
>>></strong></font> </p>
<p><font face="Arial, Helvetica, sans-serif"><strong><a href="main.php?id=registrieren.html">>>
Registrieren <<</a></strong></font></p>
</div>
</form>';
else
echo '<a href="logout.php">Ausloggen</a>';
echo '<p /><a href="logged_in.php">Check</a>';
?>
</body>
</html>
kann mir jemand sagen wo da der fehler liegt?!
nur bekomme ich beim anmelden folgenden fehler...
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/htdocs/kirktos/main.php:7) in .../login.php on line 35
hier mein script:
<html>
<head>
<title>login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#333333" text="#CCCCCC">
<p> </p>
<p align="center"><font size="+2" face="Arial, Helvetica, sans-serif"><strong>SUBsP/\Ce
Login:</strong></font></p>
<form method="post" action="">
<div align="center">
<p><font face="Arial, Helvetica, sans-serif"><strong>
<select name="select">
<option value="1">Test</option>
</select>
User:
<input type="text" name="username">
Passswort:
<input name="userpass" type="password" id="userpass">
::::>
<input type="submit" name="Submit" value="LOGIN">
>>></strong></font> </p>
<p><font face="Arial, Helvetica, sans-serif"><strong><a href="main.php?id=registrieren.html">>>
Registrieren <<</a></strong></font></p>
</div>
</form>
<?
session_start();
include 'sessionhelpers.inc.php';
if (isset($_POST['login']))
{
$userid=check_user($_POST['username'], $_POST['userpass']);
if ($userid!=false)
login($userid);
else
echo 'Ihre Anmeldedaten waren nicht korrekt!';
}
if (!logged_in())
echo '<form method="post" action="">
<div align="center">
<p><font face="Arial, Helvetica, sans-serif"><strong>
<select name="select">
<option value="1">Testuni</option>
</select>
User:
<input type="text" name="username">
Passswort:
<input name="userpass" type="password" id="userpass">
::::>
<input type="submit" name="Submit" value="LOGIN">
>>></strong></font> </p>
<p><font face="Arial, Helvetica, sans-serif"><strong><a href="main.php?id=registrieren.html">>>
Registrieren <<</a></strong></font></p>
</div>
</form>';
else
echo '<a href="logout.php">Ausloggen</a>';
echo '<p /><a href="logged_in.php">Check</a>';
?>
</body>
</html>
Kommentar