Move from a multiselected table rows to another and change the name of a field

Move from a multiselected table rows to another and change the name of a field

sapurahsapurah Posts: 1Questions: 0Answers: 0

Hello. I have a table that i can multiselect the items. Each rows contains text and also hidden input fields. I need to copy the selected rows into another table and rename the hidden input field names to something else. How do I copy and rename the field as well ? My itemlist table looks something like this:

 <?php  foreach  ($nonselitem as $crt => $v)
                                {
                                echo "</tr>";   
                                    echo "<td>";
                                        echo  "<input type='hidden' name='item[]' value='" .$v['id']. "'>";            
                                        echo  "<input type='hidden' name='set[]'  value='" .$sets-> id. "'>";   
                                        echo $v['code'];
                                    echo "</td>";
                                            
                                    echo "<td>";
                                        echo $v['name'];
                                    echo "</td>";
                                echo "</tr>";
                                     }
                                    
                            ?>

I need to rename the item[] to item1[], apart from copying my selected itemlist table into selecteditemlist table ?

Thanks in advance

This discussion has been closed.