「入力FormのGET」Viewソースコード
<form action="/testcake/home/next" method="get"> <!--getするデータ --> <input name="id" value="get_data"> <input type="submit" value="更新" name="submit"> <meta charset="utf-8"> </form>
「入力FormのGET」Controllerソースコード
public function next() { <!--get2パターン --> $this->set('id', $this->request->getQuery("id")); $this->set('id1', h($_GET['id'])); }
GetしたデータをViewへ出力
<p>id =<?= $id ?></p> <p>id1=<?= $id1 ?></p>