codeigniter - get the value of checked checkboxes in the form in other way
<p>Is there other way how to get the value of all checked checkboxes in my form and display it on the other view?</p>

<p><strong>here's my input view</strong></p>

<pre><code>&lt;div class="col-md-6"&gt;

      &lt;input type="checkbox" name="sen_id[]" class="Form-label-radio" value="&lt;?php echo $sen['id']; ?&gt;" id="&lt;?php echo $sen['id']; ?&gt;" /&gt;
      &lt;input type="checkbox" name="sen_id[]" class="Form-label-radio" value="&lt;?php echo $sen['id']; ?&gt;" id="&lt;?php echo $sen['id']; ?&gt;" /&gt;
      &lt;input type="checkbox" name="sen_id[]" class="Form-label-radio" value="&lt;?php echo $sen['id']; ?&gt;" id="&lt;?php echo $sen['id']; ?&gt;" /&gt;

&lt;/div&gt;
</code></pre>

<p><strong>my model</strong></p>

<pre><code>public function view_sen($sen_id){

    $sen_id[] = $this-&gt;input-&gt;post('sen_id');
        foreach ($sen_id as $id) {
            $this-&gt;db-&gt;select('*')-&gt;from('party_candidates')-&gt;where('id', $id);
            $query[] = $this-&gt;db-&gt;get()-&gt;result_array();
        }   
   return $query;  

    }
</code></pre>

<p><strong>my controller</strong></p>

<pre><code>public function balot_form(){

     $sen_id[] = $this-&gt;input-&gt;post('sen_id');
        $view_sen_votes = $this-&gt;vote-&gt;view_sen($sen_id);       
        $data = array("view_sen_votes" =&gt; $view_sen_votes);

        $this-&gt;load-&gt;view("admin_dashboard/votation_page/balot_form_page", $data);

} 
</code></pre>

<p><strong>display results view</strong></p>

<pre><code>&lt;div class="col-md-6"&gt;
  &lt;?php foreach($view_sen_votes as $sen =&gt; $id) { ?&gt;
    &lt;div class="row"&gt;      
       &lt;div class="form-group"&gt;
          &lt;label&gt;Senators&lt;/label&gt;
            &lt;input type="text" class="form-control" value="&lt;?php echo $sen[$id]; ?&gt;" name="sen_id" /&gt;      
       &lt;/div&gt;                                        
     &lt;/div&gt;
  &lt;?php } ?&gt;
&lt;/div&gt;
</code></pre>

<p>how to get the value and display it on my result view? thanks, regards..</p>