$this->getRequest()->getParams(); //Retrieves all parameters sent
$this->getRequest()->getPost(); //Retrieves the post array
$form->getValues(); //retrieves form values
These are common ways to work with the request object, they are not
this is what to expect from $this->getRequest()->getParams();
Notice that the url parameters are module, controller, action, station = 1, submit = Submit
Params array(5) {
["module"] => string(5) "admin"
["controller"] => string(5) "index"
["action"] => string(5) "index"
["station"] => string(1) "1"
["submit"] => string(6) "Submit"
}
This is the same request using $this->getRequest()->getPost();
Post array(2) {
["station"] => string(1) "1"
["submit"] => string(6) "Submit"
}
to get these values on your own use Zend_Debug::dump($var, 'label');
Created with Zend Framework.
This echo $_GET['id']; is considered very bad practice in ZF.