Values in a double select

Hello:

How I can get the values ​​resulting from a double select?

I have an apllication control

Regards

Hello,

Please take a look at the example and tutorial below:

example: http://scriptcase.net/phpgenerator/samples/php-form/update-a-link-table/
tutorial: http://scriptcase.net/phpgenerator/samples/tutoriais/form/form24.php

regards,
Bernhard Bernsmann

Hi Bernhard, thanks for you answer

but, how I know, inside my program, if I selected Vermont and not Maine.

How I can get the right side of the select; if I selected Vermont and Connecticut how to get $CitiesSelected = (‘Vermont’,‘Connecticut’); which is the var name where the double select store the items selected

Thank you :slight_smile:

Your selects are stored in one string separated by a pipe character. So your {field} will contain the selected values.

Albert:

Excellent!!

Thank you very much!

Hi Bernhard,

The link is broken.
Do you have the revised link ?

Thank’s

[QUOTE=bartho;11596]Hello,

Please take a look at the example and tutorial below:

example: http://scriptcase.net/phpgenerator/samples/php-form/update-a-link-table/
tutorial: http://scriptcase.net/phpgenerator/samples/tutoriais/form/form24.php

regards,
Bernhard Bernsmann[/QUOTE]

Somebody has another example?, I need storage in my db the double select field selected items. Also know how many items are selected. Thanks in advance.

Do you have and example to call de values?

The data will be stored like ‘myoption1|myption2|myoption3’ if you have three items selected. So all selected elements will be stored with a separator. You can extract that from the database and use the php explode statement to form an array with individual values and process them.

You’re right, is working.

The example is:
$result = explode(’";"’, str_replace(";",",",{CUPONES}));
$mystring = implode(’","’, $result);

$array = explode(’,’,$mystring);
$count = count($array); // array size
I don’t exactly how this work but after many test is done.

you can help me too I have a similar problem:
I would like to memorize in the table the selections of a “double select” in my case I have two tables which are as follows:

“CartellaPaziente” with the following fields:
-------------------------------------------------- ------------ IdAccettazioneVisita int(11) Auto incremento
DataAccettazioneVisita date
CCIdPaziente int(11)
MotivoVisita varchar(35)
Ortottista varchar(35)
Medico varchar(35)
Accettazione char(2)
IdPatologiaF int(11)
Note_PatologiaF longtext


“tabpatanamnesif” with the following fields:
-------------------------------------------------- ------------ IdPatologiaF int(11) Auto incremento
PatologiaF varchar(25)


I would like to select multiple entries from the “tabpatanamnesif” table and store them in the “Patient Folder” table, as in the example I enclose. Thank you in advance for the help you will be able to give me. [ATTACH=CONFIG]n82308[/ATTACH]

double_select.jpg

maybe can you making that whith this
http://www.scriptcase.net/docs/es_es/v9/manual/06-applications/04-form-application/22-form-many-to-many-relation/