I have a script that aims to insert multiple items into a list of a form using Ajax.
For each element inserted in this list, a next one should be added.
After inserting X elements, it should take all values and play in just one input, adding to the end of each element as a br/
tag, via PHP send to MySQL.
Ex:
<label>Insira os valores</label>
<ul>
<li>elemento 1</li>
<li>elemento 2</li>
<li>elemento 3</li><span>+ adiciona proximo</span>
</ul>
The submit POST
must generate an array (element1 + element2 + element3) by adding br/
to the end of each element, and sent only in input name="elementos"