[eluser]khagendra[/eluser]
Here is modification of your view file v_example.php to submit all the selected values
-- view (v_example.php) --
Code:
<form action="<?=site_url('example/multiple')?>" method="post">
<SELECT NAME="sections[]" MULTIPLE>
<OPTION value="Web Authoring Reference">Web Authoring Reference</OPTION>
<OPTION value="FAQ Archives">FAQ Archives</OPTION>
<OPTION value="Design Elements">Design Elements</OPTION>
<OPTION value="Tools">Tools</OPTION>
<OPTION value="Feature Article">Feature Article</OPTION>
</SELECT>
<input type="submit" value="Submit" />
</form>
-- Controller (example.php) --
Code:
class Example extends Controller {
function Example()
{
parent::Controller();
$this->load->helper('url');
$this->load->library('form_validation');
}
function index()
{
$this->load->view('v_example');
}
function multiple()
{
foreach($_POST['sections'] as $sec)
echo $sec."<br>";
}
}
I have listed the selected values form the list.
Hope this will help u
Enjoy! :-)