View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

PHP MYSQL Form - Multiple Select List

Thread began 12/30/2009 2:51 pm by karen.marley367377 | Last modified 5/03/2011 4:03 pm by karen.marley367377 | 15580 views | 29 replies

Eric Mittman

In order for the page to work like this you must ensure that you have the array of values posting to a page to begin with. Do you have this part worked out? This is the first thing we were working on.

Once you have the list posting an array of values you would then store the imploded array into your db.

On the update page you will have a recordset that will select the record based on the id. In the field in the recordset that holds the values you will need to explode the values into an array, just like you imploded the array to get the string of values but backwards. Once you get the string of values into an array you can then use the in_array function to compare values to values in this array to see if they are present.

The select list that you have should be populated by a different recordset. The record that is being updated should come from it's own recordset. So the select list on the page should have a loop for one recordset to populate the available options. Then you will be using the in array function with the variable that you set based on the values that were in the other recordset to compare against. So you will be comparing a value from the recordset that is populating the selections with the array of values you exploded earlier.

If you continue to have trouble with this please post back and include both pages in question so that I can get a feel for how you have them working now and what needs to be done to get them working correctly.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...