How to submit multiple values using a listbox
Posted: Fri Mar 04, 2005 11:10 pm
Can any one tell me how to submit multiple values from a list box? I believe it has something to do with Arrays or Loops but i'm not sure.
this is this list box code. As you can see it is populated by the products database.
Could somebody show me what the array loop thing is supposed to look like. So this list box submits multiple values. At the moment when you submit the form all that is entered into the database is the word Array not the values of the list box. Do I need to change the setting in the mySQL datbase. At the moment the field it is entered into is Text.
much appreciated
Thank you :0)
feyd | please use
this is this list box code. As you can see it is populated by the products database.
Could somebody show me what the array loop thing is supposed to look like. So this list box submits multiple values. At the moment when you submit the form all that is entered into the database is the word Array not the values of the list box. Do I need to change the setting in the mySQL datbase. At the moment the field it is entered into is Text.
Code: Select all
<select name="vehicle_typeї]" size="20" multiple>
<?php do { ?>
<option value="<?php echo $row_rsProductsї'vehicle_type']?>" ><?php echo $row_rsProductsї'vehicle_type']?></option>
<?php } while ($row_rsProducts = mysql_fetch_assoc($rsProducts)); ?></select>Thank you :0)
feyd | please use
Code: Select all
tags while theCode: Select all
tags are offline[/color]