Hi,
I have this little problem I just can't figure out...
Code snippet:
<?
include('../_include/database.inc.php'); // db-class
include('functions.inc.php'); // has genContactList()
$oDb = new db;
$oDb->db_connect();
....
genContactList();
?>
PHP throws 'Fatal error: Call to a member function on a non-object ..
functions.inc.php on line 6' at me whenever I request this page.
Code at line 6: $rsContacts = $oDb->db_query($sql);
My best guess is the function doesn't inherit $oDb. Tried defining $oDb
as global, without success.
What am I doing wrong?
Thanks!