tobeyt23 Posted December 14, 2010 Share Posted December 14, 2010 I am using cakephp have a controller users inside of that I am using the model companies. All loads and looks great, but when I try and do an ajax post to save the company info I get page not found, but when I do an ajax call to user all works fine. Has this happened to anyone else? function user() { $this->autoRender = false; if($this->RequestHandler->isAjax()) { if ($this->data) { $this->User->create(); if ($this->User->save($this->data)) { } } } } function company() { $this->autoRender = false; if($this->RequestHandler->isAjax()) { if ($this->data) { $this->Companies->save($this->data); } } } Quote Link to comment https://forums.phpfreaks.com/topic/221622-model-in-controller/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.