I have a form that keeps for (1) Company (N) Branches. The point is that I do not know how to do to add N number of branches according to the user.
As an example:
<form action="../Logica/registrarResiduos.php" method="post" onsubmit="return verifOpt()">
<h2>6)A .DATOS DE EMPRESA:</h2>
<label>Razon Social: </label> <input type="text" id="txtRS" name="razonsocial" maxlength="50" required="required"/>
<h2>6)A .DATOS DE SUCURSAL:</h2>
<label>6)A.1. Domicilio: Calle:</label><input type="text" name="calle1" maxlength="50" required="required"/>
In PHP I use $_POST['razonsocial']
for the name of the company and $_POST['calle1']
for the street of the branch.
How do I make the user add as many branches as he wants? (without having to generate the fields with JavaScript and then having to travel with PHP since the form is large and it would take me a lot of work to do that).