Update database with several form fields with the same name

If I've made good progress on my CF photo album project, but now I meet a problem.  Once I downloaded a collection of photos and them inserted in my database, I bring up a page that is actually an array containing the thumbnail of each image, some info on it and the description of the photo.

The table is inside a < form > tag, and the description is a < textarea > tag.  I have many text boxes that I have pictures, so there may be any number (within reasonable limits).  I'd like to be able to type a description for each picture in each text box rather than having to do one at a time, and then click the button submit to update my file.

Each text box has the same name, so I had the idea of adding a hidden form field that held the photo ID, then on the processing page, I might have a < cfloop >.  My problem is that I can not understand how to associate each photo with the corresponding description ID, especially if we consider that some of the descriptions may be empty.

Is there a good way to do this?

As you probably understand, giving all your textareas eponymous means that when the form is submitted, you get a value that is a list of the contents of each text box comma-delimited.  If none of the commas are typed in the text box, you have a problem.

My preferred method is to include some sort of identifier as part of the name of the form field.  Since you have ID photo available, I would use those.  This would give your names textareas as description_111, description_112, etc.

When the form is submitted, I loop through the form.fieldnames list.  If the first 12 characters are 'description_111', I can remore 12 characters to get the id.  I also have the content of the text box using the array notation.

Tags: ColdFusion

Similar Questions

  • Recommendation req - how two database with the same name can exist on a single server

    Description of the problem: I have a database named 'aaa' (9i db) in production and we need a copy of it to create 'aaa' in the same server with the same name, but an 11g database.

    9i 'aaa' is an exixting database in an AIX 5.3 Server.
    You will need to create a copy of this database 11 g named 'aaa' on the same server. I use the utility exp and imp db, but not sure how far it is recommended to have the same db names in a single server. Not sure about listener etc. problems.

    Any suggestions on this would be appreciated!

    Create this database for a specific application, test and cut classes to prod.

    The goal is admirable.
    The proposed plan makes me shudder.
    V11.2 must be installed on system new/other, IMO; to reduce the risk of wrong operation on the basis of incorrect data.

  • How to display all the data to a database with the same name?

    I am familiar with the creation of basic website, but I want to learn how to create more dynamic Web sites.

    I create a Web site where a user can register on the site and counts there. Once into account here, there will be different options they can do.

    The new application form is in the section account it is configured for a user to submit a multiple application and save it in the database, that works, but the problem I have is during the examination of the application, it does show that one of them, not all.

    How can view the request of a user, sign in?datab.PNG

    revreq.PNG

    I can get to the screen, but not all.

    Is it possible to do this or any suggestions on how to do?

    Here's the code for the ReviewRequest:

    <? PHP require Connections/Connections.php"?" >

    <? PHP

    session_start();

    {if (isset($_SESSION["fname"]))}

    }

    else {}

    Header('Location:NewRequest.php');

    }

    ? >

    <? PHP

    $User = $_SESSION ['Pnom"];

    $result = $con-> query ("SELECT ALL * from newrequest where Fname ="$User"" ");

    $row = $result-> fetch_array (MYSQLI_BOTH);

    $_SESSION ["FirstName"] = $row ["Fname"];

    $_SESSION ['location'] = $row ["Location"];

    $_SESSION ['description'] = $row ['Description'];

    ? >

    <! doctype html >

    < html >

    < head >

    < link href = "CSS/Master.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "CSS/Menu.css" rel = "stylesheet" type = "text/css" / > "

    < meta charset = 'utf-8 '.

    ReviewRequest < title > < / title >

    < / head >

    < body >

    < div class = "Container" >

    < div class = "Header" > < / div >

    < div class = "Menu" >

    < div id = 'Menu' >

    < nav >

    < ul class = "cssmenu" >

    < li > < a href = "Account.php" > account < /a > < /li > ""

    < li > < a href = "UpdateAccount.php" > update account < /a > < /li > ""

    < li > < a href = "NewRequest.php" > new request < /a > < /li > ""

    < li > < a href = "ReviewRequest.php" > Review Request < /a > < /li > ""

    < li > < a href = "LogOut.php" > sign out < /a > < /li > ""

    < /ul >

    < / nav >

    < / div >

    < / div >

    < div class = "LeftBody" > < / div >

    < div class = "RightBody" >

    < name of the form = "form1" method = "post" action = "" >

    < div class = "FormElement" >

    < label for = "FirstName" > < / label >

    < input name = "FirstName" type = 'text' required class = "TField" id = "First name" value = "<?" PHP echo $_SESSION ['FirstName'];? ' > ' >

    < / div >

    < div class = "FormElement" >

    < label for = 'Place' > < / label >

    < input name = "Location" type = 'text' required class = "TField" id = 'Location' value = "<?" PHP echo $_SESSION ['Location'];? ' > ' >

    < / div >

    < div class = "FormElement" >

    < label for = "Description" > < / label >

    < input name = "Description" required class = "TField" id = "Description" value = "<?" PHP echo $_SESSION ['Description'];? ' > ' >

    < / div >

    < / make >

    < / div >

    < div class = "Footer" > < / div >

    < / div >

    < / body >

    < / html >

    You would browse the information stored in the $result variable.

    $result = $con-> query ("SELECT ALL * from newrequest where Fname ="$User"" ");

    As below:

    fetch_assoc()) {? >}

    (I don't see a reason to assign data to a variable of $_SESSION?)

    You also probably would be well advised to select information based on a uniquie rather than a name id - if two people have the same name youre UNLESS you want to make sure that two identical Fname can be stored in your tabe stuffed.

    $result = $con-> query ("SELECT ALL * from newrequest where userID = '$userID'");

    userID |     Fname |     Location |                      Description

    8 the end of the road muddy and foggy

    11 this something, no idea

    8               the              rstreet                           rah

    8 is not a clue

    14 Hello Goodbye

  • Different databases with the same name in 1 cluster?

    Hello classmates of dba,.

    I wish to discuss with you the following situation:

    We have a 4 RAC Cluster node.

    Databases node 1 and 2 contain the 11.2.0.3 (Enterprise Edition)

    Databases node 3 and 4 contain 11.2.0.4 (Standard edition)

    12.1 GI on all nodes and all are part of the 1 cluster.

    OS: Oracle Linux 6.5 (with + ASM)

    Our company wants to migrate databases EE 1 and 2 to 3 and 4 nodes node:

    -Downgrade of EA to itself

    -Upgrade 11.2.0.3 to 11.2.0.4

    Normally I do this by creating databases with DBCA under a new name and migrate data using Data Pump.

    The problem is that the company wants to have the same name of database on all nodes.

    Is it possible to have the same name of database on all 4 nodes simultaneously (from 2 houses of Oracle RDBMS different with different versions while all 4 nodes share 1GI?

    It is a method of support?

    Let's see if I can describe it more in detail.

    You have a database named ORCL in your RAC environment. Create a new blank database named SLAVE_PORT_NUM. Perform a dump of export of ORCL and import in SLAVE_PORT_NUM. At this point, you have the data in the new database. The original database to stop now:

    srvctl stop database orcl immediate o d

    ORCL is no longer running on all nodes. We just need to allow users to connect to this database with a service name. But before I can do, I need to remove the Cluster registry ORCL:

    srvctl remove the d orcl database

    Now create a service named ORCL that connects to SLAVE_PORT_NUM

    srvctl add service d slave_port_num s orcl r - newdb1, newdb2, newdb3, newdb4

    Your application always tries to connect to "orcl" on this same group. They don't know the PB has changed its name.

    When you change only the name of the service for the new database. I guess that the path of the ASM will have different name right?

    It cares ASM. ASM paths come into play when you create the new db.

    HTH,

    Brian

  • database link between databases with the same name

    Hello
    I need a link to db between two databases are named the same way on two different servers.
    1 has a dev1 and Server2 database server has a database of dev1. The tnsnames on server2:
    DEV1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server2) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV1)
    )
    )

    DEV1_server1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server1) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = dev1)
    )
    )

    Can someone let me know a way to create a data link between the previous two?
    Thank you.

    This should work:

    create the '' link of the public database
    to connect to
    identified by ''.
    using '(DESCRIPTION =)
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = tcp.world)
    (PROTOCOL = TCP)
    (Host = )
    (Port = 1521)
    )
    )
    (CONNECT_DATA = (SID = )
    )
    )';

  • Rename fields with the same name

    Hello

    I ended up creating a form with several boxes of hundreds.  In order to create, I create a few check boxes and then cut and paste to generate the rest of the form.  Unfortunately, this means that all the fields have the same name and face to the same value.  Can I write a script that will change the name of each field?  My boxes are "Yes #0", ' Yes #1 "," #2 yes ", etc.."  I want them to be 'yes0', 'yes1', "YES2", etc.  But, when I try to 'this.getField("yes#0"), we just return null.  Y at - it a syntax that I can use with getField to go individually to each box?

    I don't really want to open the properties on the + 400 boxes Editor...

    Thank you.

    You cannot rename fields with JavaScript. But you can create as many times as you need in a loop by using the doc.addField method. So could copy properties (rect, etc.) of your current fields and recreate each using the name you want. You can access instances of fields (widgets) using the getField as method:

    Get the rect of the first 'yes' field

    var Rect = getField("yes.0").rect;

    For more information, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.679.html

    When you are finished adding new fields, you can remove the old with the doc.removeField method.

  • Return of the mistake of MUSE: why do we not have several files with the same name?

    Well - I thought I had all this worked and fixed, but I met the download error 'Why do we have several files with the same name' once again.  (I downloaded all the files several times today in order to 1) works the way it worked the last time and 2) get an OAM file that is not loading for some reason any load again and the download takes about an hour to transfer all the files manually.

    To recap:

    (1) an option "Upload only modified files" returns the 'Muse has encountered an error and closes.  Why do we have several files with the same name? "error just as before.

    (2) a full download will work but takes forever and is NOT a substitution for work changed files option.

    Please advise with possible solutions!

    -Dave

    Is it possible to have two .oam different files in different folders on your computer where the .oam files have the same name? I'm theorizing that there may be a bug in the treatment to ensure the folder created for a .oam placed on the server receives a unique name, particularly in the case of a partial update of the site on the server.

    Please send us the .muse file and all the files in .oam related to [email protected] along with a link to this topic for the context so we can attempt to reproduce this error and isolate the root cause. If files are larger than 20 MB, you'll need to use a service such as Adobe send & Track, Dropbox, creative cloud, WeTransfer, etc. file sharing. Thank you.

  • Problem in creating several attributes XML with the same name of the attribute

    I am trying without success trying to create several attributes XML with the same name, as shown here in a Microsoft example configuration file:



      
         
         
         
      

    I'm calling the NewDocument GetRootElement functions and then "newelement" (appSetting), "newelement" (add)

    Then I call AddAttribute with add, key & Key0, then with add, value & 0.  This seems to work fine but when I try to add the second pair of key & Key1 and value attributes & 1 for item "Add" replaces ""and I find myself with"" only.

    I do something wrong or CVI is not able to create an XML of this type?

    Thank you

    Here's how you do it. I show not to keep things simple error checking.

    #include

    public static void CreateAddElement (mother of CVIXMLElement, const char * key, const char * value)
    {
    Add the CVIXMLElement;
    CVIXMLNewElement (parent, -1, 'Add', &add);)
    CVIXMLAddAttribute (add, "touch", key);
    CVIXMLAddAttribute (add, "value", value);
    CVIXMLDiscardElement (add);
    }

    void main (void)
    {
    CVIXMLElement root, and appSetting;
    Doc CVIXMLDocument.
     
    CVIXMLNewDocument ("configuration", &doc);)
    CVIXMLGetRootElement(doc, &root);)
    CVIXMLNewElement (root,-1, "appSetting", and appSetting);
    CreateAddElement (appSetting, "Key0", "0");
    CreateAddElement (appSetting, "Key1", "1");
    CreateAddElement (appSetting, "Key2", "2");
    CVIXMLDiscardElement (appSetting);
    CVIXMLDiscardElement (root);
    CVIXMLSaveDocument (doc, 1, "c:\\temp\\temp.xml");
    CVIXMLDiscardDocument (doc);
    }

  • Why do an update with the same name every day to security update for Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package (KB2467175)

    I installed this point at least 6 times. is there a change in one update to another with the same name?

    Hi RogerMawdsley,
     
    Follow the steps listed in the article given below to resolve this issue:
  • Database test on a different server with the same name of SID as database production - thoughts?

    Hello

    We use oracle 11.2.0.3 and have 2 environments a production environment and test each on different servers.

    Currently, our test database has database different SID to the production one.

    DBA is eager to have the database of test with the same name of SID.

    Thoughts/concerns in this area - will be on different servers.

    Thank you

    We also had a similar situation, it allows to save a few hours when cloning (we do not use RMAN), but a lot of damage, it can create.

    So much better with different names on different servers.

    concerning

    Pravin

  • Several files with the same name.

    Cannot publish to Business Catalyst because of a fatal error, where it is said "why do we have several files with the same name?  The website and all its contents have not changed in more than a year with the exception of minor changes to the wording so unable to understand what the error is encountered. Are there not better misdiagnosed at one point less for the files in question.

    The problem is the result of a mixture of case-sensitive and case-insensitive between how files within the .oam are put into interaction with and what is written in the muse_manifest.xml file during a re - download full compared to an incremental download.

    If all .oam packages files are tiny and the original .oam were replaced in Muse with the all new tiny .oams, then you should select Upload: publish all the files in the dialog box Options. From there, forward publication of incremental changes should work without errors.

  • Server data store will automatically get updated when the new file (with the same name) is placed in the landing area


    Hi guys,.

    The data store server-side will get automatically updated when a new file with the same name is loaded in the landing area?

    for example

    1 data store created for server-side get the file named UK.xls (he has 5 rows)

    2 snapshot created for the above data store

    3. created with the snapshot process

    After that if I remove 2 lines from the same file and load again to the landing (with the same name). So by re-running the process will take the last file OR do I need to reload the file in the data store every time when there is a change in the file. We also tried with option to work but the last file was not picking up.

    Any help will be really appreciated.

    Please lets us know your updates.

    Please advice

    Thank you

    VT

    Hello

    When you create a snapshot, you create a snapshot whose task (provided that you use a data store server-side) can be run from a job. To refresh the data, run the snapshot in a job task. If you create a task at the time the snapshot and the processes that use it, they will automatically connect and will be 'upstream' data through the snapshot in the process. You can then choose whether it would be appropriate to write the snapshot or not (for the effectiveness of performance if you want to do the straight through processing) by activating or deactivating the bucket of data staged that the snapshot written to. The snapshot in the work task means that the data is refreshed.

    For the work of design to the Director, you can refresh the snapshot by running again it manually in the context menu.

    Kind regards

    Mike

  • newBie Q: how to make a clickable form to access a slide with the same name of the form (button c_1 drag c_1 f.e.).

    I've done a few clickable placeholders on a masterslide

    Then: a new slide based on this masterslide

    and to use a script or shared action that says "(le saut de succès à une autre diapositive avec nom samen te que le bouton...)"

    Sorry for this unusual semantic language.

    But already thank you for answering!

    Lucas

    PS I use a trial version to test a branched interactive scenario. A choice of a user driven tot another slide with a followed video reaction of other choices,...)

    Not possible to use a variable in this case to link the label name for a name for the slide.  But I still don't see the purpose at all?

    Will you need to the same button with the same name on multiple slides? Will you use for the rest of the project timing in this case? Because you cannot reuse a name of a button, if you have two instances of this button on two different slides, they will need each a different name. If this is the same form button, programmed for the rest of the project, we will always use the same action, needs not even a tip action because it will «Pop X zip» But there is no way to use the name of the button in this action at all. Joint action is possible with X as the parameter, and then you can assign it to all the buttons that have need of this action. But why do you want that the link between the button name and the name of the slide?  Can you explain? My Captivate intuition tells me that there is a misunderstanding, perhaps because of your experiences of Lectora. Captivate is really different, presented on the differences in workflow with an expert Lectora. I no longer use Lectora but the structure, and certainly the way to 'script' is totally different.

  • Is it possible to create a database of the Clone with the same name of source db?

    Is it possible to create a database of the Clone with the same name of source db with RMAN...


    DB version is 11.2.0.2

    &

    Is it possible to clone a 11.2.0.2 database at 11.2.0.3 home location directly on a new server. If it starts in upgrade mode, it's ok...

    Hello;

    Here's what I have:

    Frequently asked Questions about the restoration or duplication between different Versions and platforms [ID 369644.1]

    This thread:

    Re: Duplicate RMAN

    Never done it myself, but I think that his

    alter database open reselog upgrade;
    

    I can predict all the details of this are understood to do a test on a system I can trash.

    Best regards

    mseberg

  • XOQ-01950: Cube contains several BuildSpecifications with the same name.

    Hi all

    When executing the option to maintain Cube he throws under question: any clue?

    XOQ-01950: the AWCubeOrganization for cube 'NN_OLAP_POC. MARKET_SALES_CUBE"contains several BuildSpecifications with the same name.

    Thank you
    Exq

    This error should show only upward when you create a cube (by importing XML), not when you maintain. So, I'll assume that's what you hear.

    If you are importing XML that references an OLAP object that already exists, whereas the new definition replaces the old. The only exception to this rule is the BuildSpecification object. This kind of object is called, but it does not follow these conventions (for reasons of disorder of implementation). If you import the XML code that has a BuildSpecificaiton with the same name as one that already exists, then you will trigger the error you see. Here is a relevant example of XML.

    
     
    
    

    The solution is to remove this section from the XML before importing it.

  • several devices on the network with the same name

    I want to install Windows 7 OS computers on a domain with Small Business SERVER 2003.  Curiously, I see all the computers on the network, where I should be able to, but one of them WK02011, is not accessible from all Windows 7 systems because there are multiple devices with the same name on the network according to a diagnosticn check.  WK02011 is visible and accessible from other systems on the network that are runjning XP OS.  There is only one device named WK02011 on the network.  I don't have this problem with any other XP system - that is - I can see and access all of the other XP machines on the network with the exception of WK02011.  I can't access WK2011 from the server and the server indicates that it is multiple devices with the same ID.  Rename the XP would be complicated because of having to re - set up the service to the customer and then turn around and install 7 OS in the workstation in the coming days.

    How to find the ghost device double?

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for Windows 7 on TechNet. Please post your question in the Technet forums. You can follow the link to your question:

Maybe you are looking for