I'm trying to make a MySQL & PHP based control panel for my community. And I've made a settings.php file with arrays with configs. I have class files for functions but there is MySQL function, which will not connect with data I've entered on settings.php..
I've tried other config file options, but none of them works...
on settings.php I have MySQL data like this:
$config['database']['host'] = "---";
$config['database']['user'] = "---";
$config['database']['password'] = "---";
$config['database']['database'] = "---";
And on userdata.php class file, where I'm trying to use those config variables I have:
$mysql = new mysqli($config['database']['host'], $config['database']['user'], $config['database']['password'], $config['database']['database']);
obviously, on userdata.php I have also required the settings.php..
I was expecting the output to be correct, but it shows only 'wrong MySQL data' errors...