Cita:
Iniciado por GatorV
No es necesario que le pongas el índice, con que lo pongas como [] es suficiente, en PHP lo recibes usando ya sea $_POST o $_GET y es un arreglo que puedes iterar usando un for() o un foreach().
Saludos.
Quieres decir así:
Código PHP:
<div id="TabbedPanels2" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Dirección</li>
<li class="TabbedPanelsTab" tabindex="0">Dirección 2</li>
<li class="TabbedPanelsTab" tabindex="0">Dirección 3</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<table width="100%">
<tr>
<th scope="col">Calle</th>
<input name="NUM_DIR[]" type="hidden" size="" value="1" />
<th scope="col"><input name="calle[]" type="text" size="30"value="" /></th>
<th scope="col">Nº</th>
<th scope="col"><input name="numero[]" type="text" size="1"value="" />
EDF
<input name="edificio[]" type="text" size="1"value="" />
PTA
<input name="puerta[]" type="text" size="1"value="" />
PISO
<input name="piso[]" type="text" size="1"value="" />
LTA
<input name="letra[]" type="text" size="1"value="" /></th>
</tr>
<tr>
<th scope="col">Localidad</th>
<th scope="col"><input name="poblacion[]" type="text" size="30" value="" /></th>
<th scope="col">Provincia</th>
<th scope="col"><input name="provincia[]" type="text" size="30" value="" /></th>
</tr>
<tr>
<th scope="col">Email</th>
<th scope="col"><input name="email[]" type="text" size="30" value=""/></th>
</tr>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%">
<tr>
<th scope="col">Calle</th>
<input name="NUM_DIR[]" type="hidden" size="" value="2" />
<th scope="col"><input name="calle[]" type="text" size="30"value="" /></th>
<th scope="col">Nº</th>
<th scope="col"><input name="numero[]" type="text" size="1"value="" />
EDF
<input name="edificio[]" type="text" size="1"value="" />
PTA
<input name="puerta[]" type="text" size="1"value="" />
PISO
<input name="piso[]" type="text" size="1"value="" />
LTA
<input name="letra[]" type="text" size="1"value="" /></th>
</tr>
<tr>
<th scope="col">Localidad</th>
<th scope="col"><input name="poblacion[]" type="text" size="30" value="" /></th>
<th scope="col">Provincia</th>
<th scope="col"><input name="provincia[]" type="text" size="30" value="" /></th>
</tr>
<tr>
<th scope="col">Email</th>
<th scope="col"><input name="email[]" type="text" size="30" value=""/></th>
</tr>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%">
<tr>
<th scope="col">Calle</th>
<input name="NUM_DIR[]" type="hidden" size="" value="3" />
<th scope="col"><input name="calle[]" type="text" size="30"value="" /></th>
<th scope="col">Nº</th>
<th scope="col"><input name="numero[]" type="text" size="1"value="" />
EDF
<input name="edificio[]" type="text" size="1"value="" />
PTA
<input name="puerta[]" type="text" size="1"value="" />
PISO
<input name="piso[]" type="text" size="1"value="" />
LTA
<input name="letra[]" type="text" size="1"value="" /></th>
</tr>
<tr>
<th scope="col">Localidad</th>
<th scope="col"><input name="poblacion[]" type="text" size="30" value="" /></th>
<th scope="col">Provincia</th>
<th scope="col"><input name="provincia[]" type="text" size="30" value="" /></th>
</tr>
<tr>
<th scope="col">Email</th>
<th scope="col"><input name="email[]" type="text" size="30" value=""/></th>
</tr>
</table>
</div>
Pero y el INSERT me va a ingresar solo una dirección no?