In general, the situation is as follows. There are two forms; the first form allows the user to select the number of processes using the checkbox . The second allows the user to assign elements to each process using jquery-drag and jquery-drop . The problem is that after assigning elements for each process, I want to print the resulting elements, sorted for each process. The added feed is an example with only two lines of processes. After clicking the 'save' button, I get one line with the saved list, but I need it to be two different lines for each of the processes. Here is the code with the loop :
<label><?php for($y=0;$y<$len;$y++) { echo "<div class='proc'> <pre>"; echo "Process: ".$proc[$y]." "; echo "People required: ".$num[$y]." "; echo "<span class='assigned' name='assigned[]' >People Assigned: </span><br /></pre>"; ?> <div class="procLeader"> <label>Leader:</label> <div class="ui-widget-content"> <div class="procleader"> <ol> <li class="placeholder" name="procleader[]" <?php if (isset($procleader)) echo 'value="'.$procleader.'"' ?>>Add Process Leader here</li> <input type="hidden" name="procleader[]" class="hiddenListInput3" /> </ol> </div> </div> </div> <div class="procChecker"> <label>Checker:</label> <div class="ui-widget-content"> <div class="procchecker"> <ol> <li class="placeholder" name="procchecker[]" <?php if (isset($procchecker)) echo 'value="'.$procchecker.'"' ?>>Add Process Checker here</li> <input type="hidden" name="procchecker[]" class="hiddenListInput4" /> </ol> </div> </div> </div> <div class="prodStuff"> <label>Stuff:</label> <div class="ui-widget-content"> <div class="prodstuff"> <ol> <li class="placeholder" name="prodstuff[]" <?php if (isset($prodstuff)) echo 'value="'.$prodstuff.'"' ?>>Add Stuff here</li> <input type="hidden" name="prodstuff[]" class="hiddenListInput5" /> </ol> </div> </div> </div> <?php echo "</div>"; } ?> </label>