PHP - RADIO GROUPS y BOTON

 
Vista:

RADIO GROUPS y BOTON

Publicado por edwin (15 intervenciones) el 13/08/2007 16:22:00
de verdad necesito que alguien pueda ayudarme a corregir los errores q tengo, este es el codigo:

lo que quiero hacer es despues de presionar el boton PROCESAR me realice o haga o vea todas esas opciones de los radio buttons que se seleccionaron, y como se el valor del radiobutton por cada grupo de radio buttons (es decir por fila) para asi saber cual opcion se selecciono por cada grupo de radios, gracias por anticipado.

<form id="form1" name="form1" method="post">

<div id="theStudio">
<div class="formLabel">
<div align="left">
<table width="229" border="0" class="Estilo3">
<tr>
<td width="98" class="Estilo3"><div align="left" class="style2">
<div align="right">Estado:</div>
</div></td>
<td width="121" class="Estilo3">
<select class="Estilo3" name="cmbestado" id="cmbestado" onChange="recarga();">
<option value="0">Seleccione...</option>
<?php
while ($rsrow == true)
{
$veces = $veces + 1;?>
<option
<?php if ($_POST['cmbestado'] != "") {
if ($_POST['cmbestado'] == $veces){
echo ("selected");
}
}?>
value=" <?php echo(pg_fetch_result($rs,$veces-1,"edo"));?> "> <?php echo(pg_fetch_result($rs,$veces-1,"edo")); ?> </option>
<?php
$rsrow = pg_fetch_row($rs);
}
?>
</select>
</td>
</tr>
</table>
</div>
</div>

<div class="formLabel">
<div align="left">
<table width="228" border="0" class="Estilo3">
<tr>
<td width="101" class="Estilo3"><div align="left" class="style2">
<div align="right">Municipio:</div>
</div></td>
<td width="117" class="Estilo3">

<div align="left">
<select class="Estilo3" name="cmbmunicipio" id="cmbmunicipio" onChange="recarga();">
<option value="0">Seleccione...</option>
<?php while ($rs2row == true){
$veces2 = $veces2 + 1;?>
<option <?php if ($_POST['cmbmunicipio'] != "") {
if ($_POST['cmbmunicipio'] == $veces2){
echo ("selected");
}
}?>
value="<?php echo(pg_fetch_result($rs2,$veces2-1,"mun"));?>"> <?php echo(pg_fetch_result($rs2,$veces2-1,"mun")); ?> </option>
<?php
$rs2row = pg_fetch_row($rs2);
}?>
</select>
</div></td>
</tr>
</table>
</div>
<div align="right">
<label>
<div align="center">
<input name="ayuda" type="image" class="Estilo3" id="ayuda" src="images/ayuda03.gif" alt="Seleccionar en la siguiente tabla si la descripcion es una Ciudad, o es una Poblacion, o es una Localidad sino puede Eliminar dicha descripcion" align="middle" />
</div>
</label>
</div></div>

<div align="left"></div>
</div>

<div align="left">
<table width="655" border="1">
<tr>
<td width="154"><div align="center"><strong>DESCRIPCION</strong></div></td>
<td width="88"><div align="center"><strong>CIUDAD</strong></div></td>
<td width="134"><div align="center"><strong>POBLACION</strong></div></td>
<td width="132"><div align="center"><strong>LOCALIDAD</strong></div></td>
<td width="113"><div align="center"><strong>ELIMINAR</strong></div></td>
</tr>
<?php
$grupo = 1;
while ($rs3row == true){?>
<tr>
<td><div align="center"><?php
$veces3 = $veces3 + 1
?>
<?php echo(pg_fetch_result($rs3,$veces3-1,"descripcion"));?>
<?php
$rs3row = pg_fetch_row($rs3);
?>
</div></td>
<td><div align="center">
<input name="RadioGroup<?php echo $grupo.'[]'; ?>" type="radio" value="Ciudad"/>
</div></td>
<td><div align="center">
<input name="RadioGroup<?php echo $grupo.'[]'; ?>" type="radio" value="Poblacion"/>
</div></td>
<td><div align="center">
<input name="RadioGroup<?php echo $grupo.'[]'; ?>" type="radio" value="Localidad"/>
</div></td>
<td><div align="center">
<input name="RadioGroup<?php echo $grupo.'[]'; ?>" type="radio" value="Eliminar"/>
</div></td>
</tr>
<?php
$grupo++; // suma 1 al grupo para de esta manera hacer independiente el //siguiente grupo de radio buttons
}
?>

</table>
<p align="center"><input name="Procesar" type="submit" class="Estilo3" id="Procesar" value="Procesar" />
<input name="ayuda2" type="image" class="Estilo3" id="ayuda2" src="images/ayuda03.gif" alt="Si desea procesar todas las opciones seleccionadas anteriormente" align="middle" />
</p>
<label></label>
<p>
<label></label>
<br />
</p>
</div>

</form>

<form id="form3" name="form3" method="post" action="insertar.htm">
<div align="center">
<input name="Agregar" type="submit" class="Estilo3" id="Agregar" value="Agregar" />
<input name="ayuda3" type="image" class="Estilo3" id="ayuda3" src="images/ayuda03.gif" alt="Si desea agregar una nueva descripcion" align="middle" />
</div>
</form>

</div>
</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder