1

Kohana 3.3 で問題が発生しています。コントローラーで $this->request->post() を使用して $_POST 値を取得できません。コードで何が間違っていたのかわかりません。ここで私を助けてくれることを願っています。ところで、Kohana 3.3 を使用してすべてのテンプレートで Twig を使用できましたが、フォームからのデータを処理できませんでした。ありがとうございました。:-)

これが私のコードです:

コントローラ:

class Controller_Setup extends Controller{
     public function action_item_group(){
         if (HTTP_Request::POST == $this->request->method()){
                // Post has no data
                print_r($this->request->post());

         }
         $this->response->body( Twig::factory('setup/sample_form') );
     }
}

意見

<form class="form-horizontal" action="item_group" method="post" name="setup_form">
 <input type="text" value="">
 <button type="submit">Save</button>
</form>
4

1 に答える 1