Welcome Guest, Not a member yet? Register   Sign In
selected=selected
#3

[eluser]Bigil Michael[/eluser]
i have already done adding multiple locations using multiple select box
now i want to do edit

values inside the table is like this
Code:
id destinations
1   tvm,kollam,ernakulam

Code:
i have read those values using this code

$loc = $this->Mypackages_model->select_destinations($selected_package);
$k = $loc->destinations;
//now $k = tvm,kollam, ernakulam

$k= explode(",",$k);
$data['locat'] = $k;


view
Code:
<select name="location[]" multiple="multiple" id="location">
                                &lt;?php
                                foreach($locat as $row)
                                {
                                ?&gt;
                                <option value="&lt;?php echo $row['location_name']?&gt;" &lt;?php echo set_select('location',$row['location_name']);?&gt; >&lt;?php echo $row['location_name']?&gt;</option>
                                &lt;?php
                                }
                                ?&gt;
                                 </select>


it only prints the first letters ie t,k,e
can any one help me thanks in advance


Messages In This Thread
selected=selected - by El Forum - 02-07-2011, 12:46 AM
selected=selected - by El Forum - 02-07-2011, 04:13 PM
selected=selected - by El Forum - 02-08-2011, 01:45 AM
selected=selected - by El Forum - 02-08-2011, 03:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB