title: auto refresh controller function in codeigniter
body: <p>hello everybody i want to refresh controller function after 5 sec automatically
  i am using <code>header('Refresh: 10.2');</code> inside controller function like</p>
  
  <pre><code>public function delete()
      {
  
          header('Refresh: 10.2');
          $current_time=date('H:i:s',strtotime("+3 hours"));
          $email=$this-&gt;session-&gt;userdata['email'];
          $end_time=$this-&gt;model_user-&gt;get_res_endtime($email);
          if($current_time&gt;$end_time || $current_time &lt;'00:59:59')
          {
              $this-&gt;model_user-&gt;move_reserve($end_time,$email);
  
              $this-&gt;model_user-&gt;up_qty_del($email);
  
              $this-&gt;model_user-&gt;delete_reserve($end_time,$email);
          }
  
      }
  </code></pre>
  
  <p>but this refresh the whole page also have any method that will refresh only function?
  thanks in advance</p>