swethak
07-25-2008, 12:56 PM
hi
i wrote a code to select multiple items in a drop down list.And i store all the items in my database.But in that i select multiple items and submit that items last item only stored.Please tell that what's the mistake in my code.
<td><select name="imagelist" id="imagelist" multiple="multiple">
<?
while($row=mysql_fetch_array($result))
{
$i=1;
$urlname=$row['urlname'];
?>
<option value="<?=$urlname?>"><?=$ext=strrchr($urlname,'/');?></option>
<?
}
?>
</select>
And i store these items in a database with a name $_POST['imagelist'].
Anybody plz tell that whats the mistake in my code.plz help me.
i wrote a code to select multiple items in a drop down list.And i store all the items in my database.But in that i select multiple items and submit that items last item only stored.Please tell that what's the mistake in my code.
<td><select name="imagelist" id="imagelist" multiple="multiple">
<?
while($row=mysql_fetch_array($result))
{
$i=1;
$urlname=$row['urlname'];
?>
<option value="<?=$urlname?>"><?=$ext=strrchr($urlname,'/');?></option>
<?
}
?>
</select>
And i store these items in a database with a name $_POST['imagelist'].
Anybody plz tell that whats the mistake in my code.plz help me.