I am Learning so
Can suggest some code.
How can i add Multi select Box in Codeigniter.
Thank You
I am Learning so
Can suggest some code.
How can i add Multi select Box in Codeigniter.
Thank You
Taken from http://ellislab.com/codeigniter/user-guide/helpers/form_helper.html
$this->load->helper('form');
$options = array(
'small' => 'Small Shirt',
'med' => 'Medium Shirt',
'large' => 'Large Shirt',
'xlarge' => 'Extra Large Shirt',
);
echo form_multiselect('shirts[]', $options, $shirts_on_sale);
then how to get value in controller..
like this: $this->input->post('shirt')??
$shirts = $this->input->post('shirt');
foreach($shirts as $shirt){
echo $shirt;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.