I am trying to get the parameter passed in the url using the zend framework. But of course this does not work! My code is as follows:
URL creation:
<?php echo $this->url(array('controller' => 'poll', 'action' => 'showresults', 'poll_id' => $poll['_id']), null, true) ?>
Retrieving the poll_id parameter in showresultsAction ():
$request = new Zend_Controller_Request_Http();
$poll_id = $request->getParam('poll_id');
The problem is that $ poll_id is NULL. When I do var_dump $ request-> getParams (), it is also NULL. I looked at the Zend Framework document, but it was not very useful. Any ideas? Thank!
source
share