title: How to add download helper in a button in codeigniter
body: <p>I want to add a link in a table which download and delete my uploaded data in <code>codeigniter</code>. It's my viewer and it only shows the file name and date from the database which I had uploaded       </p>
  
  <pre><code>foreach($query as $row)
  {
    echo "&lt;tr&gt;";
    echo "&lt;td&gt;&lt;h2&gt;". $row-&gt;filename ."&lt;/h2&gt;&lt;/td&gt;";
    echo "&lt;td&gt;&lt;h2&gt;". $row-&gt;date ."&lt;/h2&gt;&lt;/td&gt;";
    echo "&lt;td&gt;&lt;h2&gt;".$row-&gt;filelink."&lt;/h2&gt;&lt;/td&gt;";
    //now how can i make download and delete from my database
    //my database contains filename,fileid,filelink       
    echo "&lt;/tr&gt;";
  }
  </code></pre>
  
  <p>My model is</p>
  
  <pre><code>function showfile()
  {
    $this-&gt;db-&gt;select('filename, filelink, date');
    $query = $this-&gt;db-&gt;get('upload_file');   
    return $query-&gt;result();
  }
  </code></pre>
  
  <p>My controller </p>
  
  <pre><code>function index()
  {
    $this-&gt;load-&gt;model('showuploadmodel');
    $data['query']=$this-&gt;showuploadmodel-&gt;showfile(); 
    $this-&gt;load-&gt;view('showupload_view',$data);
  }
  </code></pre>
  
  <p>I want to add a delete link and download link and delete only a specific row from database and download a file for which a Id is passed. How can I pass field from database into download helper?</p>