View Full Version : Classes and Functions

28 Oct 2005, 04:12 PM
I am running PHP5 on Windows XP SP2.
I have a page with a class that I use with
$DB= new DBInterface;
Outside a function it works, but if I use $DB inside a function I get an error mesage:
Fatal error: Call to a member function Query() on a non-object in D:\Apache\Apache(re)\Apache2\htdocs\MembersCheck.php on line 11
For some reason it thinks that $DB is not an object
does anyone know how to fix this problem?
Thanks in Advance...