This is a common error, I'm sure, but I can't figure out why I'm getting it. I'm new to OOP, but I figure I'm instantiating the object incorrectly?
First the include:
<?php include("/classes/justgiving.php"); ?>
Which is absolutely correct, as far I can tell.
Then I try to instantiate...
$justgiving = new JustGiving();
And then when I try to run the method in the object:
$justgiving->createAccount($xml);
And in the class .php file:
class JustGiving{
function createAccount($xml) {
// function code
}
}
But I'm getting the following error:
Fatal error: Call to a member function createAccount() on a non-object
I have a feeling this is a real newb error, and it's something really obvious.
Thanks a lot.