I just switched hosts for my site and I'm fixing the bugs I didn't see. But I just noticed something that I don't know how to fix. When I try to access a part of my site I get this error:
error said:
Fatal error: Cannot redeclare userlist() (previously declared in /path_goes_here/header.php:7)
in /path_goes_here/header.php on line 6
in /path_goes_here/header.php on line 6
And those lines in header.php are
function userlist(){
$timee=time();
$time=$timee-(60*15);
mysql_query("DELETE FROM `online` WHERE `username`='".$_SESSION['username']."'");
mysql_query("DELETE FROM `online` WHERE `time`<'".$time."'");
mysql_query("INSERT INTO `online` (id,username,time,uid) VALUES ('NULL','".$_SESSION['username']."','".$timee."','".$_SESSION['id']."')") or die('Error - '.mysql_error());
}
I'm really confused and have no idea what am I doing wrong
Thanks, Matt
Edit:
I'm sorry to bother you with my stupidness...I noticed I was calling header.php twice..
Edited by Friiks, 10 July 2007 - 04:38 PM.
