Check this out:
views\email\blast.php
<center>
<label for="input1">List Emails</label>
<select name="listbox" id='pre-selected-options' multiple='multiple' size="7">
<?php
foreach($email as $item){
echo '<option value="'.$item['email'].'">'.$item['email'].'</option>';
}
?>
</select>
</center>
controllers\email.php
private function send_email($id){
$this->load->model('EmailModel');
// bikin to yg pake , nanti di explode
$to = array();
$to[] = $this->input->post('pre-selected-options');
I wonder if this line is correct: $to[] = $this->input->post('pre-selected-options');
Supposing that many emails is being selected and I am trying to capture the value from the controller into $to[] - how to do so?
Thanks in advance.
" If I looks more intelligence please increase my reputation."