Setting->findAll(); $this->data = $settings; $this->set("settings", $this->data); } function admin_update() { if(!empty($this->data)) { if($this->isCancelled()) { $this->doCancel(); } else { foreach($this->data['Setting'] as $fName => $fValue) { //echo $fName; $this->Setting->updateSetting($fName, $fValue); } //$this->redirect("/admin/settings"); } } else { $this->Session->setFlash("Direct access to that page is not allowed"); } //$this->redirect("/admin/settings"); } } ?>