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); } } } Link to comment https://forums.phpfreaks.com/topic/221622-model-in-controller/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.