dieses script will einfach nicht bei mir laufen:
<?
/*
CREATE TABLE userlog (
Kennummer int(11) DEFAULT '0' NOT NULL auto_increment,
ID char(255),
IP char(255),
NAME char(255),
COUNT char(255),
DATE char(255),
PRIMARY KEY (Kennummer)
)
*/
// Schreiben des Eintrags in eine Tabelle...
$database= "pfffft_de";
$sqlhost= "mysql-webpack.one-2-one.net";
$sqluser= "user";
$sqlpass= "pass";
mysql_connect($sqlhost,$sqluser,$sqlpass) OR DIE( "Couldn't connect to MySQL server!");
mysql_select_db($database) OR DIE( "Couldn't select database!");
$logtab = "userlog";
$time = explode( " ", microtime());
$userusec = (double)$time[0];
$usersec = (double)$time[1];
$User_Id = $usersec + $userusec;
$IP = getenv(REMOTE_ADDR);
$logtab = "userlog";
$userlog = "";
$deleteuser = mysql_query("delete from $logtab where DATE < $usersec -800");
$userlog = mysql_fetch_row(MYSQL_QUERY("SELECT * FROM $logtab where IP like '$IP'"));
if ($userlog == false) {
$ok = mysql_query("insert INTO $logtab (ID,IP,NAME,DATE)
VALUES('$User_Id','$IP','$HOST','$usersec')") or die("Unbale to query db!");
}
$resultlogtab = mysql_query("SELECT Count(*) as total FROM $logtab");
$numberlogtab = mysql_fetch_array($resultlogtab);
// Hier wird die Anzahl der User ausgegeben...
if ($numberlogtab[total] != ""){
print "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"-2\">
<BR>$numberlogtab[total] User online</font>";
}
?>
was ist denn daran falsch?
hier ist die fehlermeldung:
http://www.pfffft.de/test/onlineuser.php3
<?
/*
CREATE TABLE userlog (
Kennummer int(11) DEFAULT '0' NOT NULL auto_increment,
ID char(255),
IP char(255),
NAME char(255),
COUNT char(255),
DATE char(255),
PRIMARY KEY (Kennummer)
)
*/
// Schreiben des Eintrags in eine Tabelle...
$database= "pfffft_de";
$sqlhost= "mysql-webpack.one-2-one.net";
$sqluser= "user";
$sqlpass= "pass";
mysql_connect($sqlhost,$sqluser,$sqlpass) OR DIE( "Couldn't connect to MySQL server!");
mysql_select_db($database) OR DIE( "Couldn't select database!");
$logtab = "userlog";
$time = explode( " ", microtime());
$userusec = (double)$time[0];
$usersec = (double)$time[1];
$User_Id = $usersec + $userusec;
$IP = getenv(REMOTE_ADDR);
$logtab = "userlog";
$userlog = "";
$deleteuser = mysql_query("delete from $logtab where DATE < $usersec -800");
$userlog = mysql_fetch_row(MYSQL_QUERY("SELECT * FROM $logtab where IP like '$IP'"));
if ($userlog == false) {
$ok = mysql_query("insert INTO $logtab (ID,IP,NAME,DATE)
VALUES('$User_Id','$IP','$HOST','$usersec')") or die("Unbale to query db!");
}
$resultlogtab = mysql_query("SELECT Count(*) as total FROM $logtab");
$numberlogtab = mysql_fetch_array($resultlogtab);
// Hier wird die Anzahl der User ausgegeben...
if ($numberlogtab[total] != ""){
print "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"-2\">
<BR>$numberlogtab[total] User online</font>";
}
?>
was ist denn daran falsch?
hier ist die fehlermeldung:
http://www.pfffft.de/test/onlineuser.php3
Kommentar