I am using zend framework. I am using the following statement to redirect to another action.
Above statement is working perfectly and 'some_action' is called. Now I want to pass some parameters to 'some_action' like this.
And how to get parameters in called action. Usually we do like this:
$userName = $_REQUEST['uname']; $usermail = $_REQUEST['umail'];
How to perform this? Example code please. Thanks
Zend_Controller_Action::redirect() method (which just passes through to Sarfraz's helper method)
_redirect() method is deprecated as of Zend Framework 1.7. Use
And then in the called action:
$username = $this->_getParam('username'); $email = $this->_getParam('email');
_getParam() takes a second optional argument which is set to the variable as a default if the parameter isn't found.
you can try with redirector:
$params = array('user' => $user, 'mail' => $mail); $this->_helper->redirector($action, $controller, $module, $params);