Hi,
I did a global file which is required by all other files. In this file I did:
if(!$sess->is_registered($user_prefs)) {
$user_prefs = array(
"lang" => $lang,
"font_family" => $font_family) ;
$sess->register($user_prefs) ;
echo "Session is registered" ;}
The first time this global file is parsed it's normal to register the variable $user_prefs, but it does it ALL the time. And I want it to be persistent...
Each time there is a require("my_global_file") the script enter into the if(...). It should not, 'cos I do not do a $sess->unregister($user_prefs)
What did I do wrong ?
I don't want to go through this if(...) all the time, but just once by session !
Thanks for any help.
PS:
page_open(array("sess" => "Session",...) works full well.