How to make 2 submit in form using codeignter

sometime you need two submit if form each submit has difference function like one submit for print and one again for searching data by periode for example, let say you have form like bellow

<h1 class="text-center">Form Laporan</h1>
  <form class="form-horizontal" role="form" action="<?php echo base_url()?>admin/laporan/submit" method="post" enctype="multipart/form-data">
  

<div class="form-group">
      <label for="lastname" class="col-sm-4 control-label">Dari</label>
      <div class="col-sm-3">
          <input type="text" class="form-control"  name="dari" required="" id="tanggal">
      </div>
 
</div>

<div class="form-group">
      <label for="lastname" class="col-sm-4 control-label">Sampai </label>
      <div class="col-sm-3">
          <input type="text" class="form-control"  name="sampai" required="" id="date" >
      </div>
</div>
 <div class="form-group">
      <div class="col-sm-offset-5 col-sm-3">
         <button type="submit" class="btn btn-primary" name="cetak">Cetak</button>
         <button type="submit" class="btn btn-default" name="cari">Cari</button>
      </div>
   </div>
</form>
    

and here your controller


public function submit ()
                {
if(isset($_POST['cetak']))
    {
//do something here
  }
 else if (isset($_POST['cari']))
        {
      //do something here
       }
  

well that simple tutorial for me, Cheers (y)