I'm trying to retrieve variable from jquery to my codeigniter controller.

My Jquery

```
    $(document).ready(function () {
    $('#reservation').change(function(){
            var ids = $('#reservation').val();
            $.post ( "<?php echo base_url();?>index.php/sia/index/",
             { date_search:ids },
             function(data){
                //what i need to do ??
             });
    });
});

```

My HTML

```
       <div class="input-group margin col-lg-3 col-xs-6 pull-right">
         <input type="text" class="form-control pull-right" readonly="readonly" placeholder="Cari Berdasarkan Tanggal" name="date_search" id="reservation" />
       </div>

```

and here is my controller 

```
     function index()
         {
           // How to retrieve date_search 
            $explode = explode('-',$date_search);
            $start_date = inggris_date($explode[0]);
            $end_date = inggris_date($explode[1]);
            $data['master'] = $this->db->query("select status,b.Nip,b.positioncode,a.start_date,a.ApprovedBy,c.OutletCode,a.Approvedby,a.IdAttendanceA,a.Alokasi,a.keterangan,a.files,b.FullName
            from Attendance_Alokasi a left join employee b on a.Nip = b.Nip
            left join outlet c on b.OutletCode = c.OutletCode
            where flag = '1' and (start_date >= '".$start_date."' and start_date <= '".$end_date."') and a.Nip = '".$Nip."'")->result();
        $data['judul'] = "Sia";
        $view = "sia/index";
        $controller = "sia";
        $this->get_view($data,$view,$controller);         
         }

```

How to retrieve `date_search:ids` in my controller and do `echo` ?. 

Update. 

When i do `alert(ids)` after i input `05/03/2016 - 05/03/2016` here is the result :
[![enter image description here](https://i.stack.imgur.com/wmabg.png)](https://i.stack.imgur.com/wmabg.png)