vishal bhardwaj
vishal bhardwaj

Reputation: 1

url passing parameters in zend framework

In zendframework ,When i am moving to new page with parameters using code as

$this->_helper->redirector('my-action','my-controller',null,$params-array); ,

it showing parameters in every url in application. Can anybody help me in this?

Upvotes: 0

Views: 3558

Answers (3)

PRIYESH
PRIYESH

Reputation: 1

The url() view helper is provided by Zend Framework 2 and is used to create the links we need. The first parameter to url() is the route name we wish to use for construction of the URL, and the second parameter is an array of all the variables to fit into the placeholders to use. In this case we use our ‘album’ route which is set up to accept two placeholder variables: action and id.

Upvotes: 0

Hiren Soni
Hiren Soni

Reputation: 574

You can use

$params = array('user' => $user, 'mail' => $mail);
$this->_helper->redirector($action, $controller, $module, $params);

Thanks

Upvotes: 3

Jalpesh Patel
Jalpesh Patel

Reputation: 3188

you can try this

$this->_redirect('Controllername/action?para1=value&para2=value');

Try this it'work

I hope it helps you....

Upvotes: 0

Related Questions