Im using multi select Jquery (http://www.erichynds.com/examples/jquery-ui-multiselect- widget/demos/) How can I check in PHP (Controller) which option is selected?
This is my code in View:
<select multiple="multiple" size="5">
<?php
foreach ( $this->restservice->getDepartments() as $department ) {
echo '<optgroup label="' . $department->deptName . '">';
foreach ( $this->restservice->getDepartmentsUsers( $department->deptName ) as $user ) {
echo '<option value="' . $user->{'email'} . '">';
echo $user->{'username'};
echo '</option>';
}
}
echo '</optgroup>';
?>
</select>
PS: Im using Codeigniter and I prefer to user foreach and fetch the value of selected options. Thanks