Codeigniter-autocomplete-controller


/ Published in: PHP
Save to your folder(s)

codeigniter autocomplete


Copy this code and paste it in your HTML
  1. <?php
  2. class autocomplete extends CI_Controller{
  3. function __construct() {
  4. parent::__construct();
  5. $this->load->model('mautocomplete');
  6. }
  7.  
  8. public function index(){
  9. $this->load->view('view_demo');
  10. }
  11. public function GetCountryName(){
  12. $keyword=$this->input->post('keyword');
  13. $data=$this->mautocomplete->GetRow($keyword);
  14. echo json_encode($data);
  15. }
  16.  
  17. }
  18. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.