1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    Hello again,

    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! :-)
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Rep Power
    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

Similar Threads

  1. Replies: 1
    Last Post: January 27th, 2004, 08:21 PM
  2. Populate multiple drop down box dependant on selection
    By maunded in forum PHP Development
    Replies: 3
    Last Post: January 21st, 2004, 12:52 AM
  3. Replies: 2
    Last Post: October 8th, 2003, 01:26 AM
  4. multiple selection form ??? Thanks in advance
    By zayin7232 in forum PHP Development
    Replies: 4
    Last Post: July 26th, 2003, 01:16 AM
  5. $_REQUEST and multiple selection list
    By hatembr in forum PHP Development
    Replies: 3
    Last Post: July 15th, 2003, 09:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo