目次
POSTの場合
View (index.ctp)
| 1 2 3 4 | <form method="post" action="/hoge/index"> <input type="text" name="text_data"> <input type="submit"> </form> | 
= $str ?>
Controller (hoge)
| 1 | $str = $this->request->data('text_data'); | 
フォームじゃないけどURLからGETで受け取る場合
基本的には以下のような形式でパラメータを送る。
http://hogehoge.com/index/param1/param2/
ただし、以下のような形式でも、パラメータを送る事が可能。
http://hogehoge.com/index?p1=param1&p2=param2
この場合は、Controllerにて以下の方法で、受け取る。
| 1 2 | $this->request->query('param1'); $this->request->query('param2'); | 
まぁ、Apache側でmod_rewriteとか使えば如何様にもできますが。
