cakePHP2.6を使って、cookbookのブログチュートリアルに似たようなアプリケーションを作成中です。
データの受け渡しがうまくいっていないのか
エラーは出ないのですがデータを投稿しても、
うまく反映されません。
どなたか詳しい方アドバイスいただいたいです。
**CollegesController.php** <?php class CollegesController extends AppController { public $helpers = array('Html', 'Form'); public $components = array('Flash'); public function index(){ $this->set('colleges',$this->College->find('all')); } public function add(){ if ($this->request->is('post')) { $this->College->create(); if ($this->College->save($this->request->data)) { $this->Flash->success(__('○○')); return $this->redirect(array('action' => 'complete')); } $this->Flash->error(__('○○')); } } **add.ctp** <h1>フォーム</h1> <?php echo $this->Form->create('College'array('action' => 'complete')); echo $this->Form->input('○○'); echo $this->Form->input('○○'); echo $this->Form->end('送信'); ?>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/02/28 05:40
退会済みユーザー
2016/02/28 05:43
2016/02/28 05:43
退会済みユーザー
2016/02/28 06:15
2016/02/28 06:17
退会済みユーザー
2016/02/28 08:00
2016/02/28 08:27
退会済みユーザー
2016/02/29 07:32
2016/03/01 17:11