So i have this class that includes some custom functions named class.php I have another file called config.php that includes
require('engine.class.php');
$engine = new engine;
config.php also requires functions.php to run like:
require('functions.php');
i have a function in functions.php that uses $engine eg:
function login($username, $password){
return $engine->mysql_query('SELECT `user_id` WH...', 'array);//this is custom function in class.php
}
but when i run the page that reuires config.php i get some error like:
Fatal error: Call to a member function mysql_query() on a non-object in ../somedir/functions.php on line 3