I\'m new to codeigniter. I\'m trying to make a simple site, that will get its \"settings\" on the database, if the site is enabled (1) or not (0).
I\'m trying to determi
Use something like this for your controller:
$setting = $this->modelName->getsetting(); if($setting['maintenance'] == 1){ $this->load->view('maintenance', $data); } else { $this->load->view('index' $data); }
Be sure to replace 'modelName' with the name of the 'getsetting' method's model.