Welcome Guest, Not a member yet? Register   Sign In
multiple select box
#1

[eluser]Bigil Michael[/eluser]
i want to use multiple select box to add multiple locations
that code is running smoothly.....

now i want to do edit

here the locations must be listed as selected = selected

my code in view is
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>

how to apply selected=selected here;

values inside the table is like this

Code:
id destinations
1   uk,usa,ussrindia,china
2   canada, chili

can anyone help me
thanks in advance....




Theme © iAndrew 2016 - Forum software by © MyBB