Jump to content

PHP Error


Drezard

Recommended Posts

Error:

Fatal error: Non-abstract method USERS::user_numberonline() must contain body in C:\Program Files\xampp\htdocs\wintersword\includes\users.php on line 310

 

}

function user_numberonline();

	$timestamp = date(YmdGi);
	$old_timestamp = $timestamp - 5;

	$query = "SELECT * FROM user_ids WHERE timestamp > '$old_timestamp'";

	$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());

	$count = mysql_num_rows($result);

	echo "<p>Users online: $count</p>";

}

 

Cheers, Daniel

Link to comment
https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204096
Share on other sites

Im not rocket scientist but shouldin't it be setup like this?

 

function user_numberonline() {

	$timestamp = date(YmdGi);
	$old_timestamp = $timestamp - 5;

	$query = "SELECT * FROM user_ids WHERE timestamp > '$old_timestamp'";

	$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());

	$count = mysql_num_rows($result);

	echo "<p>Users online: $count</p>";

}

 

--FrosT

 

Link to comment
https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204098
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.