Get and post in cakephp Get and post in cakephp php php

Get and post in cakephp


$value = $this->request->data('key');

Please for further reference, read the manual. It's so much easier and better for yourself to figure it out by yourself.

http://book.cakephp.org/2.0/en/controllers/request-response.html#accessing-post-data


The Post data must be in data to show up in $this->request->data.

Example:

// input field<input type="text" name="data[foo]" value="bar" />// in your controllerdebug($this->request->data);