gple Posted June 25, 2007 Share Posted June 25, 2007 If I have a list in which I can choose multiple values (ie) echo "<form action=edit_prod.php?enter=4 method=post>"; echo "<select name=type_size size=6 multiple>"; for ($i=0;$i<$num;$i++) { $type_size=mysql_result($result,$i,"type_size"); echo "<option value=".$type_size.">".$type_size."</option>"; } echo "</select>"; echo "<input type=submit name=submit value=Update></form>"; How do I bring all the values over so I can insert all the values into a table? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted June 25, 2007 Share Posted June 25, 2007 <SELECT name="type_size[]" ....> The results will be in the array $_POST['type_size']. Quote Link to comment Share on other sites More sharing options...
gple Posted June 25, 2007 Author Share Posted June 25, 2007 That works but the values have two words (ie Baseball Cards) and only Baseball is outputted. HOw do I get around this? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted June 25, 2007 Share Posted June 25, 2007 You should be quoting the values. <option value="Baseball cards">Baseball cards</option> ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.