Note that there are some explanatory texts on larger screens.

plurals
  1. POSubmit unique record with multiple dynamic inputs
    primarykey
    data
    text
    <p>I have been working on a form with the help of many here on SO. I have a form where users get 1 fieldset to fill out with all the inputs initailly. Then they can click ADD MORE or submit the form as is. If they click ADD MORE the users get all of the inputs again and a foreach allows them to be submitted along with the 1st fieldset in 1 submission. There can be as many as the user would like.</p> <p>The problem is each of the submissions is not unique. They are all lumped together into one submission. </p> <p>Here is the submit code: </p> <pre><code> if ($reqtype=="accesschange"){ $subject="Request Access Change(s)"; $a=$_REQUEST['request']; foreach ($a as $name) { foreach ($name as $key =&gt; $desc) { switch (gettype($desc)) { case 'array': foreach ($desc as $i =&gt; $item) { //show which queue to go to based on C or D $drive = ($item == "File System") ? "162" : "161"; $note .= "{$key}"; $note .= "&amp;nbsp;".$item."\n"; } break; case 'string': default: if ($desc !== '') { $note.= $key; $note.= "&amp;nbsp;".$desc."\n"; } } } $note .="\n"; $note = $UP-&gt;stripSpecialChars($note); $note = $UP-&gt;remSlash($note); $myxml = "&lt;connector&gt;"; $myxml .= "&lt;function name=\"incident_create\"&gt;"; $myxml .= "&lt;pair name=\"lvl_id3\" type=\"integer\"&gt;".$note."&lt;/pair&gt;"; $myxml .= "&lt;/function&gt;"; $myxml .= "&lt;/connector&gt;"; echo $myxml; } } </code></pre> <p>How can I make each of these a unique submission? I have been thinking I need some kind of counter or way to make each of these unique... If this is confusing, let know. Thanks. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload