lo estoy trabajando desde un data grid
mi estructura del formulario es la siguiente
Código PHP:
Ver original<?php
// $consulta2="SELECT * FROM area WHERE codigo not in (select area from detalle)";
$consulta2="select alumno.codigo, alumno.nombres, aula.nombre, aula.codigo from alumno inner join aula on aula.codigo=alumno.aula where aula.codigo='".$_GET["cod"]."'";
?>
<form name="frm" method="post" action="grabar_prueba.php" id="agregar" >
<table cellpadding="0" cellspacing="0" border="0" width="932" class="tablecont">
<tr>
<td align="left" valign="top" height="460" width="677" >
<!--- Areas --->
<div style="overflow:auto; width:877px; height:600px;">
<table cellpadding="0" cellspacing="0" border="0" width="877">
<?
$sw="1";
for($i=0;$i<$num2;$i++){
if($sw=="1")
// $sql=insert into permisos(,)values ('','','','');
{
?>
<tr onMouseover="fila(this)" bgcolor="#F2F2F2">
<td align="center" valign="middle" height="20" width="38" >
<div align="center">
<input name="alumno[]" type="checkbox" value="
<? echo mysql_result($rsU2,$i,("codigo"))?>" onclick="setPointer('#F2F9FF',this);">
</div> </td>
<td align="left" valign="middle" height="20" width="264" class="mantenimiento" >
<?
?> </td>
<td align="left" valign="middle" width="153" class="mantenimiento" ><input name="n1[]" type="text" class="input" id="n1" size="12" /></td>
<td align="left" valign="middle" width="69" class="mantenimiento" ><input name="n2[]" type="text" class="input" id="n2" size="12" /></td>
<td align="left" valign="middle" width="353" class="mantenimiento" > </td>
</tr>
<?
$sw="0";
}elseif($sw=="0")
{
?>
<tr onMouseover="fila(this)" bgcolor="#FDFDFD">
<td align="center" valign="middle" height="20" width="38" >
<div align="center">
<input name="alumno[]" type="checkbox" value="
<? echo mysql_result($rsU2,$i,("codigo"))?>" onclick="setPointer('#F2F9FF',this);">
</div> </td>
<td width="264" height="20" align="left" valign="middle" class="mantenimiento" >
<?
?> </td>
<td width="153" height="20" align="left" valign="middle" class="mantenimiento" ><input name="n1[]" type="text" class="input" id="n1" size="12" /></td>
<td width="69" height="20" align="left" valign="middle" class="mantenimiento" ><input name="n2[]" type="text" class="input" id="n2" size="12" /></td>
<td width="353" height="20" align="left" valign="middle" class="mantenimiento" > </td>
</tr>
<?
$sw="1";
}
?>
<?
}
?>
</table>
</div>
<!--- Areas ---> </td>
</tr>
</table>
<input type="submit" name="agregar" value="GUARDAR" class="button" style="width:130px">
</form>