Announcement

Collapse
No announcement yet.

Values in a double select

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Values in a double select

    Hello:

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

    I have an apllication control

    Regards

  • #2
    Hello,

    Please take a look at the example and tutorial below:

    example: http://scriptcase.net/phpgenerator/s...-a-link-table/
    tutorial: http://scriptcase.net/phpgenerator/s...orm/form24.php

    regards,
    Bernhard Bernsmann

    Comment


    • #3
      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 :-)

      Comment


      • #4
        Your selects are stored in one string separated by a pipe character. So your {field} will contain the selected values.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Albert:

          Excellent!!

          Thank you very much!

          Comment


          • #6
            Hi Bernhard,

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

            Thank's

            Originally posted by bartho View Post
            Hello,

            Please take a look at the example and tutorial below:

            example: http://scriptcase.net/phpgenerator/s...-a-link-table/
            tutorial: http://scriptcase.net/phpgenerator/s...orm/form24.php

            regards,
            Bernhard Bernsmann

            Comment


            • #7
              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.

              Comment


              • #8
                Originally posted by aducom View Post
                Your selects are stored in one string separated by a pipe character. So your {field} will contain the selected values.
                Do you have and example to call de values?

                Comment


                • #9
                  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.
                  Albert Drent
                  aducom software netherlands
                  scriptcase partner, reseller, support and (turn-key) development
                  www.scriptcase.eu / www.scriptcase.nl

                  Comment

                  Working...
                  X