Thanks a lot :) i am using Zend_Session to do the job, i dunno how i forgot this :D thanks a lot for those who helped i really appreciate it.
On Fri, Aug 8, 2008 at 1:13 PM, Carlos Medina <[EMAIL PROTECTED]>wrote: > Ahmed Abdel-Aliem schrieb: > > Dear All, > > > > i have a problem setting a value in Zend_Registry and retrieving it back > in > > another page > > > > *here is the scenario, when a user log in i set his last login from the > > database in a variable :* > > > > > > Zend_Registry::getInstance(); > > Zend_Registry::set('user_last_login', > > $user_row[user_last_login]); > > > > > > *and in the page he is redirected to i try to retrieve this variable like > > this :* > > > > > > Zend_Registry::getInstance(); > > echo Zend_Registry::get('user_last_login'); > > > > > > *the page return the following error :* > > > > The following error occurred: > > exception 'Zend_Exception' with message 'No entry is registered for key > > 'user_last_login'' in > > /Library/WebServer/Documents/cha/library/Zend/Registry.php:145 Stack > trace: > > #0 > > > /Library/WebServer/Documents/cha/application/admin/controllers/IndexController.php(46): > > Zend_Registry::get('user_last_login') #1 > > /Library/WebServer/Documents/cha/library/Zend/Controller/Action.php(502): > > IndexController->indexAction() #2 > > > /Library/WebServer/Documents/cha/library/Zend/Controller/Dispatcher/Standard.php(293): > > Zend_Controller_Action->dispatch('indexAction') #3 > > /Library/WebServer/Documents/cha/library/Zend/Controller/Front.php(919): > > > Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), > > Object(Zend_Controller_Response_Http)) #4 > > /Library/WebServer/Documents/cha/admin/index.php(53): > > Zend_Controller_Front->dispatch() #5 {main} > > > > i dunno why it is not working while i can easily retrieve any variable i > set > > in the registry in my bootstrap > > > > > > here is how i deal with the registry in my bootstrap > > > > $registery = Zend_Registry::getInstance(); > > Zend_Registry::set('connection', $config->database); > > Zend_Registry::set('pageLimit', $dataConfig->pages->limit); > > Zend_Registry::set('truepath', '/cha/application/admin/'); > > Zend_Registry::set('urlpath', > > 'http://localhost/cha/admin/'<http://localhost/cha/admin/%27> > ); > > > > can anyone give me a hand in this please ? > > > > thanks in advance. > > *-------------------------------- > > Regards, > > Ahmed Abdel-Aliem > > Aroma Designs & Solutions > > www.GraphicAroma.com > > www.AromaCreatives.com* > > > > Acting by Reacting : By not printing this e-mail I help protect the > > environment. > > > > > Hi, > i Use the Zend Registry with > Zend_Registry::set( $strRegistryName, $objRegistryObject ); // use > variables on the setRegistry Method anyware. > and i get the Data with > Zend_Registry::get( 'registry' ); > > Regards > > Carlos > *-------------------------------- Regards, Ahmed Abdel-Aliem Aroma Designs & Solutions www.GraphicAroma.com www.AromaCreatives.com Acting by Reacting : By not printing this e-mail I help protect the environment.*