title: codeigniter and ion_auth autocomplete with jquery not working ~ 500 (Internal Server Error)
body: <p>I am making web app by using codeigniter and ion auth. Without ion auth integration into my codeigniter web app my autocomplete field is working properly but when I integrate ion auth library in my codeigniter then autocomplete feature stops working and showing error in console.</p>
  <pre><code>GET link?term=l 500 (Internal Server Error)
  </code></pre>
  <p>Here is my jquery code:</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
        $(function(){ 
            $(document).on(&quot;keydown.autocomplete&quot;,&quot;.task&quot;,function(e){ 
                $(this).autocomplete({ 
                    source : '&lt;?php echo base_url();?&gt;digital/search_field/task_search', 
                }); 
            }); 
        });
  &lt;/script&gt;
  </code></pre>
  <p>Here is my controller:</p>
  <pre><code>public function task_search(){
      if (!isset($_GET['term']))
      {
          exit;
      }
      $qs = strtolower($this-&gt;input-&gt;get('term'));     
      $this-&gt;pojo-&gt;search_task($qs);
  } 
  </code></pre>
  <p>Here is my model</p>
  <pre><code>public function search_task($qs){
      /*comparing data with the text box*/  
      $query = $this-&gt;db-&gt;query(&quot;SELECT t_name FROM task_name WHERE t_name LIKE ('$qs%') ORDER BY t_name LIMIT 5&quot;);
      /* It checks the row in database table*/
      if($query-&gt;num_rows &gt; 0)
      {
          foreach ($query-&gt;result_array() as $row)
          {
              $row_set[] = htmlentities(stripslashes($row['t_name']));
          }
          echo json_encode($row_set); 
      }       
  }
  </code></pre>
  <p>When I searched on google some article says it is csrf issue. I don't know more about CSRF. How can I solve this?</p>