[RESOLVED] Call to a member function on a non-object
What does this mean? Ive included a file inside my php and im trying to access a function inside of it..not sure whats goin on..
edit*
figured it out.
When including a file, you need to initiate a new class like so
PHP Code:
inc ('includes/class.myclass.php');
$myquery = new myclass();
Re: [RESOLVED] Call to a member function on a non-object
A class is a template for an object, sort of like a mould. The object doesn't exist until you create it using the new operator.
$myquery = new myclass();
The above like is like saying, "create me an object using myclass as a tmeplate and assign its location to $myquery"