Jump to content

need help on my selectbox multiple


pixeltrace

Recommended Posts

guys,

 

i need help, i have a selectbox in my update form

 

items on my selectbox will be taken from the database

and from the update form you can re-select other items and have it update

 

my problem now is, i can't make it work, i use implode and i am getting some errors

implode()function implode: argument to implode must be in array

 

how do i fix this?

below is the code for my selectbox

                    <select name="specialization[]" size="8" class="field3" multiple="multiple">
                     <option value="<? echo implode("\n",$specialization); ?>" selected><? echo implode($specialization); ?></option>
				  <?
				  include 'db_connect.php';
$uSql = "SELECT specialization FROM specialization ORDER by sid ASC";
$uResult = mysql_query($uSql, $connection);
if(!$uResult){
echo 'no data found';
}
else{
while($uRow = mysql_fetch_row($uResult)){
?>
                      <option value="<?= $uRow[0]?>">
                      <?= $uRow[0]?>
                      </option>
                      <?
    }    
}
?>
                    </select>

 

 

hope you could help me with this.

 

thanks!

Link to comment
https://forums.phpfreaks.com/topic/41940-need-help-on-my-selectbox-multiple/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.