Re: [PHP] array of unknown elements and insert query

2003-02-03 Thread enediel
Each select control has an 'options' container, you should review it to find all values for all selected elements, and create and string to send to the server into a hidden control included in the submited form. In the server will be another history!! It's the way I use, may be somebody could adv

Re: [PHP] array of unknown elements and insert query

2003-02-03 Thread Kevin Stone
Something like.. $query = "INSERT INTO tablename (fieldname) VALUES"; foreach ($_POST['listbox'] as $key => $val) { $values[] = "('$val')"; } $query .= implode(',', $values); $result = mysql_query($query); This is assuming all your listbox values go into the same table column. -Kevin -