How do I share data in an action with a Controller that contains multiple actions? I want to set related variables in an action for another action to read and use. ClassIndexControllerextendsZend_Controller_Action {publicfunctionindexAction () {if (how to share data in action)
In the code, a Controller contains multiple actions. I want to set relevant variables in one action for another action to read and use. how can I perform this.
Class IndexController extends Zend_Controller_Action {
Public function indexAction (){
If (Zend_Registry: isRegistered ('adminloginerror ')){
$ AdminLoginError = Zend_Registry: get ('adminloginerror ');
} Else {
$ AdminLoginError = $ username. "Welcome to my website ";
}
}
Public function testAction (){
Zend_Registry: set ('adminloginerror', 'ABC ');
$ This-> _ redirect ('/index ');
}
}
The above code cannot be obtained during use. please help me solve it. Thank you.
------ Solution --------------------
This problem is complicated. contact me via email [email protected]