Select Multiple into array for data insertion

I have a form that contains a menu/list that allows multiple selections. The list is bound to a dynamic source with label = to a name and value = to the names record ID. The code DW CS4 generates is:
<select name="vVol_id" size="20" multiple="MULTIPLE" id="vVol_id">
<?php
do { ?>
                <option value="<?php echo $row_rsGetStaff['vol_id']?>"><?php echo $row_rsGetStaff['full_name']?></option>
                <?php
} while ($row_rsGetStaff = mysql_fetch_assoc($rsGetStaff));
  $rows = mysql_num_rows($rsGetStaff);
  if($rows > 0) {
      mysql_data_seek($rsGetStaff, 0);
      $row_rsGetStaff = mysql_fetch_assoc($rsGetStaff);
?>
</select>
What additional code do I need to get the selected items into an array that can be 'foreach'd' to insert the selections into another table when the submit button is clicked? This one has been driving me nuts.

You just need the square brackets, something like: <select name="vVol_id[]"
vVol_id will then be an array if items are selected.
Ed

Similar Messages

  • Select MULTIPLE default values for a multiple selection list box based on another field in Infopath 2010

    Hello there - Before I explain my issue, I would like to point out that I have reviewed some other discussions on selecting default values for multiple selection listbox. But my issue is specific and different, and not answered by any of the discussions
    I visited.
    I have a multiple selection list box (say for example all countries in the world as values), and I would like to pre-select or setup multiple default values (say five countries) based on some criteria that I query from MS SQL database table.
    I know we can go to Data | Default Values option to setup one or many default values for multiple selection list box. When I enter the default values manually this works. I also right click the field under the Multiple-Selection List Box group, then select
    Add another Value Below and set the Default Value for this field to setup multiple default values.
    However, if I reference a field (either an infopath field or a field from SQL database) I am not able to setup multiple default values. Infopath automatically selects the last field I selected for all instances and in the end I am able to see only one
    default value selected instead of many. How to fix this problem? Why would infopath allow multiple default values when we enter it manually but not when we reference some fields?
    Please let me know if you need more info. Appreciate your help.
    Thanks!

    Hi redhotc,
    According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.
    I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything
    was fine.Please have a try as the below link:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Note: if you are using SQL databse table, you may need to enable ‘Allow cross-domain data access for user form templates that use connection settings in a data connection file’ in CA. More information, please refer to:
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • 1D Array for Data to buffer

    I have a force plate that sends out forces in the x,y,z and i need to be able to index them into a 1D array for a buffer.  I think i have the ground work of the program laid out but im not sure where to go from here.  See attached program.  Thanks for any possible help.  
    Attachments:
    Buffer.vi ‏20 KB

    Your VI will run forever because you have a False constant wired to the stop terminal of the loop.
    Why do you have a while loop in there anyway?
    You don't have any element going into your replace array subset.  So you have a broken arrow.
    I don't understand the meaning of your buffer full boolean.  It really isn't telling whether your buffer is full or not.  It doesn't even track how many times you've replaced various elements in the array.  It just checks whether the value you used for index is a multiple of your buffer size.  Let's say yor buffer size is 10.  If you use an index 9, the remainder of 9 mod 10 is 9, it's not equal to 0, so the boolean is false.  Okay.
    Now if your index is 10, 10 mod 10 is 0, it's equal to 0, so the boolean is true.  Okay.
    Now if your index is 11 (obviously bigger than 10)  11 mod 10 is 1.  It's not equal to 0, so the boolean is back to false.   But is seems like you really intend for it to be true.
    You aren't really ever checking if your array is "full".  You are just comparing your entered index to your "buffer size" input, which may not actually have anything to do with the size of the array.

  • How do I select multiple email address for a single person in my address book when creating a new email?

    I am coordinating a large group of people and created a group list of over one hunderd people.  The group is families and each person in the address book has several e-mail addresses. How do I select all the email address under each person in the address book so every family member recieves the e-mails?
    It appears I can select any ONE email address but selecting multiples from any one person is not allowed, why is that? Any tips would be appreciated, thanks.
    LBD

    Not sure about this problem. But if you don't get an answer soon, go here which is the Mail forum for Leopard (which you listed in your sig).
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.5_leopard?view=discu ssions#/?tagSet=1017

  • Adobe Premiere Elements 7 - Selecting Multiple Still Images for Time Stretch

    Hi,
    I have Adobe Premiere Elemetns 7. I would like to be able to select multiple still images on the timeline so that I can timestretch them all at the same time.
    I understand that you can do this when you drag the photos over to the sceneline, then get the dialog box that asks for the time duration or transition duration. I would like to do this after they have been placed on the timeline though.
    I would like to put say an hour of music on the music line, then drag over say 400 photos, then timestretch the photos such that thier time matches the music timeline. Smartsound does not seem to find the music on my computer to do this, I would like to use my own music.
    Any help would be appreciated, thanks.

    Tonight why don't you download the free 30 tryout of Premiere Elements 8, check out the feature of interest in particular, and determine if it is worth it. Check out it's stability in your computer environment. You do not have to uninstall Premiere Elements 7. When you install Premiere Elements 8, the installation process detects prior versions and tells you that you do not have to uninstall them, just use one at a time.
    Depending on how things go, get on the phone to Adobe Customer Service Monday morning and be pleasant but determined, express your need for the new feature(s), and request an exchange, the new for the old. As a last resort, request your money back for version 7.
    Please update us on your progress. But, in the back of your mind, keep the old thought of "be careful what you wish for". You may win one with the duration feature but lose some ground with stability and other features.
    ATR

  • Selecting Multiple AirPlay devices for output

    Can I select multiple airplay devices to stream music to from my iPad? It seems that I'm limited to just one airplay item which is too limiting...
    TIA,
    David

    The ipad only allows one airplay connection at a time, Itunes on a computer allows multiple.

  • Multiple Sound Card for data acquisition gives read buffer error

    I am using 6 usb based sound cards for voltages and currents mearuments of a three phase delta system.. Hardware is working well. but in labview when i use builtin Input=>sound box for data acquisition it also works well upto 4 inputs... but when i use more i.e. 6 it starts giving error "cannt perform action, read buffer is full" some thing like this... som times it goes to "not responding"...i have tried to find the solution and found in another post of this fourm to varry the sampling rate... i did it upto 96000 that is maximum ... but still problem is same...i need to know, how to manually increase the read buffer. if not possible then.. is there any way that labview stop giving any type of error during simulation?

    thnx i hv solved that problem ... now there is another problem... i am getting all my signals in computer but problem comes when i use phase detector. it keep on showing different values in phase measurement block.. how can i manage the signal with correct phase. i cannt send code cz it has many VIs and they are spread in computer. so i am pasting come photos that are showing different. look in picture...it is from same signal and the phase is different..
    Attachments:
    Capturexcvxccxvxcvcxvvxcvxcv.JPG ‏11 KB
    Capturexcvxcvxcvxcv.JPG ‏11 KB

  • Selecting multiple image files on the 'insert picture' menu in word

    Hi there,
    I am trying to insert multiple pictures at once into a word document, on office for mac 2011.
    I am using the 'insert picture' option from the toolbar. Shift-click doesn't work like on a PC, and i have tried a variety of button combinations that don't seem to have any effect! Is there any way around this so I don't have to insert picture files into a word document one at a time?
    Thanks!

    You are right, it does not work. Here is a workaround by doing an intermediate stopover in TextExit (it's in your Dock and/or in your Applications folder):
    In the Finder, select your multiple image files
    Right-click (or control-click) and select "Copy # items"
    Go to TextEdit and paste
    Do Select All (Command A) followed by Copy (Command C)
    Go back to Word and paste your heart out

  • Cannot select multiple iPhoto events for screen saver anymore... why?

    I previously had Lion and just upgraded to Mavericks last week. My screen saver settings were wiped out (no big deal), so I went into the settings to select the events, faces, etc. I had previously selected to run. But when I went to try put things back to normal, it looks as if you can only select one event, face, etc... not multiples. Am I missing something? Or is that the way things are now?

    iPhoto 9.4.3

  • Most efficient way to pack U16 -- U32 Array for Data DMA Transfer?

    I have an RT controller that wants to send down data to an FPGA using DMA.  In LabVIEW 8.2, I have no choice but to pass down U32 blocks of data however my my input data is a U16 array.  This leaves me two choices:  1) Wire the U16 Array directly to the DMA node which will coarse it to U32 but I'm wasting 16bit*#of elements 2) Pack the U16 array into a U32 Array prior to sending it down.    I would like to do #2 and I have a method that works (and seems to be pretty efficient) but I have a feeling I am doing it the hard way (or roundabout way).   Is  their a simpler (but just as efficient) way to do this procedure?  Thanks
    Solved!
    Go to Solution.
    Attachments:
    ni1.gif ‏8 KB
    ni2.gif ‏10 KB

    SiegeX wrote:
    ... unfortunately I forgot to mention that byte order does matter and odd # of inputs are allowed.
    See, that something that does not make full sense here, because you end up with a mixed byte order, because the 16bit halves are still big endian. What's at the "other" end, exactly?
    Anyway, here's a slight simplification of the previous code. (The typecast is better if we can do it all big endian and omit the "decomate/interleave" dance.)
    (You could also flatten to a string and back. This has the advantage that byte order is a direct option. I don't know how that is, performance wise.))
    Message Edited by altenbach on 11-12-2008 04:31 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    typecasting3.PNG ‏4 KB

  • Searching 1D array for data present in lookup 1D array.

    Hi!,
    I have a sorted 1D array of strings(say initial array) and I have
    three lookup array of string(say array A, array B and array C). I want
    to search the initial array with array A, array B and array C and then
    create a new array Final which will contain the elements of array A,
    if any, its start index and its last index and then element sof
    arrayB, if any found, its start index and its end index and then
    element of array C its start index and its end index.
    The start index and end index are stored in different indicatrs for
    all the three found.
    How do I search elements of 1D array with another 1D array?
    TIA,
    RK

    There are probably several ways to do it. One way to do it you would create a For Loop with the initial array run into it with auto-indexing turned off. You would then run array A into it with auto-indexing turned on. Inside of the loop, you would use a Search Array to find the index (if any) of the element in the initial array that matched the auto-indexed element of Array A. You will want to either build an array of only the indexes >=0 (trapping the "not found" -1) or you can autoindex the results and have you later code deal with them.
    You will need three of these loops, one for each searching array. Or better, you could push it into a subVI and call it three times.
    I hope that this helps!
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Can we select multiple Invalid Reasons for a single document in verifier?

    Hi all,
    Can anyone explain me how to select more than one invalid reasons in verifier?
    Cen we define new Invalid reason based on the predefined rules available in verifier?
    For ex: I wanted to use 2 rules one for 'Invoice amount do not add up' and for 'Missing/Invalid PO' under single Invalid Reason.
    Is it possible??
    If yes how can we impplement the same?
    Is there any workaround for the same?
    Thanks in advance.

    YVM wrote:
    Hi William,
    Thanks for your reply.
    But can we use a single custom invalid reason for which it will vaidate PO number and Amount also??
    Is it possible??
    Please help me out.
    I'm sorry, but I'm not even sure how to begin to answer this question. "But can we use a single custom invalid reason for which it will vaidate PO number and Amount also??"  What are you trying to set as invalid?  Why are you trying to validate other fields in spite of the fact the item already has some type of issue (which is understood since you are marking it as invalid)?
    Typically, you are going to set an invalid reason in order to get the item out of Verifier and into the EBS workflow process.
    "Exceptions" can also be set within Verifier (which is separate functionality from the invalid reasons) which would assign a new state code to an item to keep the item in Verifier instead of releasing it.  These special state codes would be set as accessible from certain workstations (with these workstations being operated by specialists who handle these specific issues).
    I'd suggest taking some more time to read the AP Solution Guide and the OFR documentation to understand what functionality already exists.  If I even vaguely understand what you are asking, you're asking for a customization that is far outside of the scope of this forum.  It will likely call for not only changes to the AP solution project, but the BPEL workflow code logic as well - which is way too much to cover in a forum post.

  • Listening to multiple ports(socets) for data?

    I know that this topic has been covered before, but is either simplistic questions or overly complex things (that I don't understand... yet)
    Here is my issue: I have data coming from two ports (TCP/IP) an array of 210 bytes and I'm not sure which port will be activated first. The data is asyncronus. So basically I want to figure out how to listen to the ports. I have this code...
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class SocketListener{
        public static void main(String[] argv){
            ServerSocket mySocket = null;
            ServerSocket mySocket2 = null;
            try {
                mySocket=new ServerSocket(12000);
                mySocket2= new ServerSocket (13000);
            catch (IOException e){
                System.err.println("error");
                System.exit(-1);
            try {
                Socket client = mySocket.accept();
                System.out.println("The server has connected to 12000\n");
                // do what I need it to do a.k.a. get data array
                client.close();
            catch(IOException e){
                System.err.println("error");
                System.exit(-1);
            try {
                Socket client2 = mySocket2.accept();
                System.out.println("The server has connected to 13000\n");
                // do what I need it to do a.k.a. get data array
                client2.close();
            catch (IOException e){
                System.err.println("error");
                System.exit(-1);
    }I'm not sure if it works or not... but thats what I got. Is this the best way to go about this or is there something else that I should look up in documentation / look for examples / someone might have a link to something.
    Thanks a lot!!!!
    Edited by: KTLightning on Sep 12, 2007 1:25 PM

    There are two issues at hand here, one being networking and the second being threading. Threading is an extensive subject and I don't want to shortchange you here, so you may want to read this tutorial if you are not familiar with Java threading concepts: http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
    That being said, if you want to concurrently listen to the sockets, you will need a thread for each socket you are listening. Otherwise you can use Java NIO, but unless you are going to be listening to many sockets at once, this complication is not necessary since the learning curve of Java NIO can be quite steep.
    You might want to start out creating a new class that will handle the task of listening to a socket and retrieving the data in its own thread. You can do this by either extending the Thread class or implementing the Runnable interface. From your main class, you can then spawn as many of those objects as you need. The trick to this approach is knowing when the data has been read from the socket and stored in the object. For only two objects this is simple as you can have a hasData() method on your worker objects and then just put a loop in your main class checking to see if the condition has been met on the objects.
    Here's some code fragments as an example...
    public class SocketReader extends Thread ...
    ServerSocket ss = null;
    boolean hasData = false;
    SocketReader(int port) {
    ss = new ServerSocket(port);
    public void run() {
    ss.accept();
    // do your stuff
    hasData =true;
    public boolean hasData() {
    return hasData;
    main() {
    SocketReader sr1 = new SocketReader(12000);
    SocketReader sr2 = new SocketReader(12000);
    sr1.start();
    sr2.start();
    // keep looping until we have data in both
    while (!sr1.hasData() && !sr2.hasData()) {
    try {
    Thread.sleep(100);
    } catch (InterrruptedException ie) {/ do something}
    } // end main
    Keep in mind that this is a very simplistic example to demonstrate the concepts and would not be a good design for pretty much any other case.

  • Tranform templateu00B4s Excel files into *.txt for Data Transfer Workbench

    I have some problems transforming the data files to import since Data Transfer Workbench.
    I haven't the extructure of de Excel templates of SAP BO.
    What is more important: I'm transforming the data with Access consults, and I use Access for convert the Excel to *.txt files. So, somebody could tell me another way to do this?

    Hello,
    You can have the structure of all DTW templates in C:\Program Files\SAP\Data Transfer Workbench\Templates.
    They are in csv format, but I think this is more easy to save them in txt format (with tab), because you will be able to use "," in the numbers easily.
    For more help on how to fill the templates, you can have a look at DI API help (in the SDK folder). You will find the explanation of every column of your templates.
    HTH,
    Thibault

  • Parse string into array for comparison

    Hi All,
    I am trying to parse a string message into an array of numbers so I can check if my event was successful.
    \FF\FE\01\FD\02\00\00\00
    I know I just need to read through and discard the \, but I don't know how to do that in Labview. I just need to check if the 6th byte = 00 or not.
    Thanks! I mostly need help with parsing in labview.

    Assuming this is a plain ASCII string containing the letters 0..F and "\" as delimiter, you can simply used "Spreadsheet string to array" with the following settings:
    Type= 1D U8 array
    format= %x
    delimiter= "\"
    One problem is the extra delimiter at the beginning, so use array subset to skip the first element.
    (EDIT: Ahh, Darin beat me with a similar solution. Mine's a little easier ).
    Message Edited by altenbach on 08-06-2009 04:30 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StringToArray.png ‏13 KB

Maybe you are looking for

  • Can't edit greyed-out HTML [was: hi]

    can anyone help us out we editing html file on dreamweaver, but some file can not be edited due to be grey or locked ... not to unlock it please help really appreciated [Subject line amended by moderator for clarity]

  • PANIC: fatal region error detected

    i encoutered this error for stress testing. in the project, we used the transaction and cursor. when the application is runing for a long time, i will receive the err about "PANIC: fatal region error detected". i change the max numbers of transaction

  • I can not get my monitor to work!

    Hello everyone. I have a first gen MacBook Pro 1.8 GHz with ATi graphics X1600. I can not get my external monitor to work. I have updated the drivers and installed the ATI catalyst control to no success. When I plug my monitor in, my laptop display i

  • EXS24 is so slow if loading an instrument i never used before

    EXS24 is so slow if loading an instrument i never used before. But after the 1st tough time, loading of this patch can be very fast later even after restarting system thousands of times:-) I did not change and use any personal setting of ESX24 data f

  • Interference robustness in firmware 7.5.2

    I upgraded airport extreme to firmware 7.5.2 and in Wireless Options I not find option Interference Robustness. Is in another place?