I have some code like this
require ("dbclass.php");
$db = new dbdriver();
function test() {
$s = $db->dbQuery("SELECT * FROM members");
if (!$s) {
echo "crap";
}else {
echo "ahaha";
}
}
test(); //call the function
Now this should work right?? But it says call to member object on blah blah blah.
This seems to me that the $db var is not usable inside the function.
help ??