October 20th, 2000, 11:59 AM
I have a small problem. I have a form that grabs reords from a mySQL database and presents the information in a nice pulldown menu. The client now wants that little menu to be a list that you can select multiple resords from (this is a brochure request for - the list has a max of 12 pieces).
I know how to get the form to look the way I want, but when I parse the form with the little app I wrote in PHP that varifies the data entered, checks feilds, and then enters it in a mySQL database for tracking purposes - there is only one record in the database - even though there were more that one records selected. Now I am simply entering $properties (the variable of the menu feild) in the the INSERT statement of my database query - do I need to parse the records selected first - what am I doing wrong...?
Please help and as always - thank you for whatever can be done or said. I just love this stuff! :-)
October 20th, 2000, 12:06 PM
first you need to make your select name properties to make it an array. Then when you process it you cannot simply add an array to the database so you need to implode the array to a string I would suggest just doing $string = implode(", ", $properties);
Then inserting $string to the db. On the other end you will need to explode the string to get it back into an array to repopulate the multi-select box