PDA

View Full Version : PHP error


Sylvus
05-07-2003, 03:06 AM
Anyone know why this is suddenly happening?

"Fatal error: Call to a member function on a non-object in C:\Inetpub\wwwroot\site\upload\admin\functions.php on line 361"


$DB_site->query("UPDATE user SET posts = posts + 1 WHERE userid = " . $bbuserinfo['userid']);


It was working fine yesterday and I am logged in.

What does the error mean? If I knew that, perhaps I could fix it.

Syl...

Xenon
05-07-2003, 08:34 AM
it means $DB_site isn't set global in the function you use it.

Sylvus
05-07-2003, 11:49 AM
Thanks Xenon! Added


global $DB_site;


And it works as it should.

Syl...