How to change status in CodeIgniter (how to useDiffrent status )

Hello, I am a beginner with Codeigniter. I want to change the status of my comments in order to validate them

db connecting

 <?php
defined('BASEPATH') OR exit('No direct script access allowed');
//get site_align setting
$settings = $this->db->select("*")
    ->get('setting')
    ->row();

?>

 View page

<?php if($settings->captcha_status == 'yes'){?>
topic------------------------------------------------------------
                               <?php } ?>

Another Method 

Controller

        $setting = $this->common_model->get_setting();
        $captcha_status=$setting->captcha_status;
        if ($captcha_status=='yes') {
topic-------------------------------------------------------

}

Our website uses cookies to enhance your experience. Learn More
Accept !