I have to make a form where there will be this table, but instead of being static is going to be dynamic, the person can introduce 1 familiar, 2, 3, 4, 10, whatever she wants. For this I am using JQUERY
, and whenever the person clicks on an add button adds a new row to the table, this part I know how to do.
My question is as follows, how do I then send the whole information to the database, told me that I would have to store in an array , but I array's in PHP I'm not very good.
EXAMPLEMY
parthtml
<form method="post" id="formulario" action="dados.php">
<div id="telefone">
<p><label>Nome</label><input type="text" class="fone" name="agregado[]" size="15" /><span class="adicionar">Adicionar registo</span></p>
<p><label>telefone</label><input type="text" class="fone" name="agregado[]" size="15" /></p>
</div>
<p><input type="submit" value="Enviar" id="btEnviar" name="btEnviar" />
</form>