How can I redirect to another action passing 2 or more parameters?
This code:
$this->redirect('input/new?year=' . $year . '&month=' . $month);
Results in URL:
http://.../input?year=2009&month=9
Well, that's normal, "redirect" redirect to an absolute URL. You can do that:
$this->redirect($this->generateUrl('default', array('module' => 'input', 'action' => 'new', 'year' => $year, 'month' => $month)));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With