I have some pages which include a number of files.
In one of the include files I have a function which I wish to be executed 
everytime the include file is loaded.

Therefore I place the function name in the include file at the top.

However, this function uses a session variable to decide whether to call 
another function and it appears that this variable is not being carried 
across. For example, the start of the include file might look like this:-



function checkMaster()
        global $master_session;
        if ($master_session[db_host])

function connectToDB()

The master_session variable is not set and hence connectToDB is never 
If I place the checkMaster code in each page that includes this file then it 
all works fine. How do I get round this?



Better than having your body rubbed vigorously with a cheese grater.

MSN Photos is the easiest way to share and print your photos: 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to