Hallo,
habe ne Fehlermeldung erhalten.
Was muss ich denn hier ändern?
"Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /srv/www/htdocs/web9/html/anmelden.php:2)"
-------------------
//header.php//
<?
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
include("./inc/config.inc.php");
include("./language/$lang_inc/$lang_inc.header.inc.php");
include("./inc/funktion.inc.php");
include("./inc/db_connect.inc.php");
register_globals ();
$aanzahl = '1';
$voting_sum = '-1';
$nachrichten = '0';
$online = '0';
$datenbank = '0';
session_start();
$user = $_SESSION["user"];
$time = time();
$onlinetime = "300";
$usertime = $time + $onlinetime;
$useroff = $time - $onlinetime;
$count == '0';
$user = $_SESSION["user"];
$sql ="DELETE FROM $db_table16 WHERE time < '$useroff'";
$ergebnis=mysql_query($sql, $db);
if ($user) {
$sql="SELECT useronline FROM $db_table16 WHERE useronline='$user'";
$ergebnis=mysql_query($sql, $db);
if($ergebnis) {
while($zeile =mysql_fetch_array($ergebnis)) {
$count++;
}
mysql_free_result($ergebnis);
} else {
echo "$sql falsch";
}
if (!$count) {
$sql ="INSERT INTO $db_table16 (useronline,time) VALUES ('$user','$time')";
if(mysql_query($sql, $db))
mysql_affected_rows() ."";
}
}
habe ne Fehlermeldung erhalten.
Was muss ich denn hier ändern?
"Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /srv/www/htdocs/web9/html/anmelden.php:2)"
-------------------
//header.php//
<?
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
include("./inc/config.inc.php");
include("./language/$lang_inc/$lang_inc.header.inc.php");
include("./inc/funktion.inc.php");
include("./inc/db_connect.inc.php");
register_globals ();
$aanzahl = '1';
$voting_sum = '-1';
$nachrichten = '0';
$online = '0';
$datenbank = '0';
session_start();
$user = $_SESSION["user"];
$time = time();
$onlinetime = "300";
$usertime = $time + $onlinetime;
$useroff = $time - $onlinetime;
$count == '0';
$user = $_SESSION["user"];
$sql ="DELETE FROM $db_table16 WHERE time < '$useroff'";
$ergebnis=mysql_query($sql, $db);
if ($user) {
$sql="SELECT useronline FROM $db_table16 WHERE useronline='$user'";
$ergebnis=mysql_query($sql, $db);
if($ergebnis) {
while($zeile =mysql_fetch_array($ergebnis)) {
$count++;
}
mysql_free_result($ergebnis);
} else {
echo "$sql falsch";
}
if (!$count) {
$sql ="INSERT INTO $db_table16 (useronline,time) VALUES ('$user','$time')";
if(mysql_query($sql, $db))
mysql_affected_rows() ."";
}
}