How I can redirect from one action on controller to another action on different controller with parameter?
I got number controller->number action to where I want go with one parameter, from index controller->index action.
$redirector = $this->_helper->getHelper('Redirector');
$redirector->gotoSimple(
'action', // action to redirect to
'controller', // controller to redirect to
'default', // module
array('param1' => 'test', 'param2' => 'test2') // params
);
Notice: Undefined property: CrudController::$_redirector in C:\xampp\htdocs\kdd\application\controllers\CrudController.php on line 23 Fatal error: Call to a member function gotoSimple() on a non-object in C:\xampp\htdocs\kdd\application\controllers\CrudController.php on line 23$redirector->gotoSimple( ....... 'default', // module array('number'=> $number ) // params ); when I try pass like this a got error: Message: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s) Request Parameters: array ( 'controller' => 'number', 'action' => 'number', 'number' => array ( 0 => 'crud', 1 => 'create', 2 => '111111111', 3 => 'default', ), 'module' => 'default', )