3
I have a script to insert several items in a list of a form, using Ajax.
For each element inserted in this list, a next one must be added.
After inserting X elements, it should take all values and play on only one input, adding to the end of each element as a tag br/
, for 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
should generate an array (element1+element2+element3) by adding an br/
at the end of each element, and sent only in one input name="elementos"
And what’s the problem you’re having? How far have I been able to go? Where are your inputs?
– Sergio
I don’t know if I understand but want to send all the elements added to the list in an array and so send? Are you using a form? How this will be used?
– William Lima