load->model(array('Mediatutorialcaptcha')); $this->load->helper(array('form','url')); $this->load->database(); } function index(){ $data['title'] = 'Percobaan Captcha MediaTutorial'; $data['cap_img'] = $this ->Mediatutorialcaptcha->make_captcha(); if($this->input->post('submit')) { if($this->Mediatutorialcaptcha->check_captcha()==TRUE) echo "Captcha cocok"; else echo " MAAP, CAPTCHA SALAH"; } $this->load->view('_view_captcha', $data); } } ?>