Accessing Form Variables

Additionally, you can access request variables (get/post) by accessing the request with $this->getRequest(). This returns an object that inherits from Zend_Controller_Request_Abstract.

You can read more about this at http://framework.zend.com/manual/en/zend.controller.request.html.

The following example demonstrates reading in a posted variable called name.

Example 3.1. Accessing post data (driver.php)

<?php
    class Driver_backend_requests_weather_controller extends Module_Backend_Driver_Abstract
    {
        public function run($path)
        {
            $request = $this->getRequest();
            
            $name = $request->getPost('name');
        }
        
        /* other code will go here */
    }
?>