I have a form that a user can insert values of a text field using an auto complete input tag method (something similar to the Stackoverflow tags input during the submission process of a question). It instantly builds an HTML div similar to the below:
<div name="new-words[]" id="new-words" multiple="multiple" class="hidden">
<option value="Flower" id="newWord_H0uTTbUsLW8R3fSpfMw16JnvpVQ9zhdW" class="selected" selected="selected">Flower</option>
<option value="Animal" id="newWord_ZxFWGZrgDcCd2nUMpz1mc1ssVLAXgIVw" class="selected" selected="selected">Animal</option>
<option value="Tiger" id="newWord_ZxFWGZrgDjijms23mmoAOPPL009AOOOO" class="selected" selected="selected">Tiger</option>
...
</div>
or
<div name="new-words[]" id="new-words" multiple="multiple" class="hidden">
<input value="Flower" id="newWord_H0uTTbUsLW8R3fSpfMw16JnvpVQ9zhdW" class="selected" selected="selected" />
<input value="Animal" id="newWord_ZxFWGZrgDcCd2nUMpz1mc1ssVLAXgIVw" class="selected" selected="selected" />
<input value="Tiger" id="newWord_ZxFWGZrgDjijms23mmoAOPPL009AOOOO" class="selected" selected="selected" />
...
</div>
My question is how can I build an array of data from the values of the option or input tag (i.e. Flower, Animal, Tiger) and send the array to a PHP file (or different URL) for further processing before inserting the data into the database? Thanks for your your help.