Hello,
I'd like to know how could I make a form with infinite elements and send it to mysql.
Example:
<div class="templatemo-input-icon-container">
<i class="fa fa-info-circle"></i>
<input type="text" class="form-control" id="name" name="sname" value="<? echo $dataname; ?>" placeholder="Person name">
</div>
I have this code which I can very easily put to work and send the sname value to a mysql database. My problem now is that I don't know how many persons the user whats to add, for that reason I'd like to add a button called Add Person, and if the user clicks it, it will appear like a new copy of this div. I've seen on the google that I can use HTML DOM createElement() to create this textboxes, but, if I do, how can I get their values if I don't know their name's or id's etc? and also how could I create an Element with classes?
PS: I'd like to make this without having to reload the page.
Thanks,
Joao Lourenco.