1

i want to pass parameter from one action to another in same controller how to do that

also how the other function receive(how to get it ) parameters??

$parameters =array('user_id'=>5,'name'=>'test');
is $this->_forward('edit',NULL,NULL,$parameters); correct or what is the correct way ??

and if it is correct how to get parameters in edit action

1 Answer 1

5

Yes your code seem correct

$parameters =array('user_id'=>5,'name'=>'test');
$this->_forward('edit',NULL,NULL,$parameters);


public function editAction()
{
    $user_id = $this->getRequest()->getParam('user_id');
    $name = $this->getRequest()->getParam('name');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.