Get post data, Zend Framework

Upvote picture Upvote · Sep 19, 2010 · Viewed 65.5k times · Source

I want to fetch posted data. But I am using no form. The data is postet by a jquery script with method post and I would like to fetch it.

I know how to fetch parameters

$id = $this->getRequest ()->getParam ( 'id', null );

and form values

$message = $form->getValue ( 'message' );

however I want to access post data and not parameters or form values. Any ideas?

Answer

Upvote picture Upvote · Sep 19, 2010

Here is my solution;)

$this->getRequest()->getPost('id', null);