パターン1
<form action="/testcake/home/next" method="post">
<input name="id" value="post_data">
<input type="hidden" name="_csrfToken" value="<?= $this->request->getAttribute('csrfToken'); ?>">
<input type="submit" value="更新" name="submit">
<meta charset="utf-8">
</form>
パターン2
<?= $this->Form->create(null, ['url' => ['controller' => 'home', 'action' => 'next'], 'type' => 'post']) ?>
<?= $this->Form->input('id'); ?>
<?= $this->Form->submit('更新') ?>
<?= $this->Form->end() ?>
if ($this->request->is('post')) {
//フォームから送信された値を取得。(inputのnameを参照)
$this->set('id', $this->request->getData("id"));
}
PostしたデータをViewへ出力
<p>id =<?= $id ?></p>