View Single Post

  #8 (permalink)  
Old 12-01-2006
Steve JORDI
 
Posts: n/a
Default Re: -> PHP4 Singleton implementation question <-

Jerry,
thanks for your explanations.

I did actually try to save the variable as a session one, but
it didn't seem to work.

I had a
start_session() ;

Then, when entering or re-entering my page, it tests
if( !isset($_SESSION['welcome']) )
$_SESSION['welcome'] =& Welcome::GetInstance() ;

Problem is that it correctly get the instance the first time,
but gets it again each time I re-enter my page.

Shouldn't $_SESSION['welcome'] be saved within the session?

From the literrature I read, it's the way to go, but clearly,
something's wrong, I'm missing something.



Sincerely,
Steve JORDI

(Remove the K_I_L_LSPAM from my email address)
------------------------------------------------
1197 Prangins Email: stevejordiK_I_L_LSPAM@hotmail.com
Switzerland WWW: www.sjordi.com
------------------------------------------------
Volcanoes at www.sjordi.com/volcanoes
MovieDB at www.sjmoviedb.com
------------------------------------------------
Reply With Quote