Sorry, should have been more specific, the declaration is outside a
function, and the link to the database is inside a function, the
complete code of which is as follows:

function db_connect()
{
$result = mysql_pconnect($cfg['servervars']['db_host'],
$cfg['servervars']['db_user'], $cfg['servervars']['db_password']);
if(!result)
        return false;
if(!mysql_select_db($cfg['servervars']['db_name']))
        return false;

return $result;
}

All variables are stored in a file called config.inc.php, included using
require_once() into every page it is needed for.

The config.inc.php is literally a list of variables with their values
already set, the premise behind this is that I can easily adapt this
setup to any site I am asked to work on...

Matt

--
+----------------------------------+
|Matthew Macdonald-Wallace         |
|The Truth Will Set you Free       |
|http://www.truthisfreedom.org.uk/ |
+----------------------------------+
BOFH Excuse #233: TCP/IP UDP alarm threshold is set too low.


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set 
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to