DMXzone App Connect Support Product Page

This topic is locked

Can I insert multiple values from a <select> formfield into my database table?

Asked 23 Oct 2019 16:31:58
has this question
23 Oct 2019 16:31:58 Bruce Wilkie posted:
Hi there

I've tried posting this question twice already, but for some reason it's not working so trying again.

I'm wanting to insert a comma-separated list into a varchar field in my mysql database table.
I've got a <select> tag in the form on the page that is set to multiple to allow selection of multiple values and I'm wanting to add all selected values into a single field in the dabase with commas separating them. And at th beginning I'm wanting to insert an additional default value that isn't included in the select form field.

So the html for the form field I have is as follows:

<select name="areas" multiple id="areas" dmx-bindopti ons="" optiontext="project_area" optionvalue="project_area">

The options are populated from another table, but when looking at the source of the published web page you'll see the following:

And I'm wanting to (for example) insert the following into a varchar field in the database table: "unfiltered,Tyneside,Teesside"

(Note that 'unfiltered' is the default value that I'd like to add at the beginning of the comma separated values text string).

Is this possible and if so, how do I do it?

thanks in advance


Replied 23 Oct 2019 19:45:11
23 Oct 2019 19:45:11 Teodor Kuduschiev replied:
Stop posting the same question over and over again, Please!

Reply to this topic