I'm working on a mod to display events for my customers that go to farmer's markets, flea markets, craft shows, etc.

I'm trying to get the mod where it will universally "pickup" the database info from the installed config file.

The code without variables is
PHP Code:
$opts['hn'] = 'localhost';
$opts['un'] = 'freddy_fender';
$opts['pw'] = 'antidisestablishmentarianism';
$opts['db'] = 'fender_zc1';
$opts['tb'] = 'events'
Of course, everything is fictitious.

It would be easier to use a database handler but, again, hard to standardize.

I've tried several versions of variables for the above to no avail. i.e.
PHP Code:
$opts['hn'] = $SERVER['DB_SERVER']; 
PHP Code:
$opts['hn'] = $DB_SERVER
I know someone will be able to point out the error of my ways.