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