Hola Amigos nuevamente me dirijo a uds. para solicitar ayuda a un grave problema que no he podido resolver.
Necesito almacenar las notas de alumnos de 1 colegio, el script lo tengo hecho hace mucho tiempo y ha funcionado bien en un servidor con php4, lo cambie a un servidor que tiene php5 y el script ya no me funciona. se trata de 1 formulario el cual creo filas dinamicamente para mostras el nombre del alumno y sus notas (calificaciones) hasta ahi ningún problema, el formulario tambien me permite a través de campos input modificar las notas que son almacenadas dentro del formulario en array (input name="nota1[]" ....... nota10[]) y es ahi donde esta el problema cuando quiero recuperar estas notas ($nota1=$_POST['nota1'][$i]) que deberian contener 37 notas1 porque es esa la cantidad de alumnos del curso, el array solo me almacena 17 elementos. tengo 10 array notas (nota1[] ...... nota10[]) si elimino uno del formulario me aumenta el numero de elementos del los otros.
La verdad estoy en contra del tiempo y estoy muy desesperado, por favor necesito ayuda.
Saludos Héctor.
aca esta el código en donde se encuentra el error:
Código PHP:
<form method="post" action="notas_2009.php" name="form_notas">
<table width="100%" border="0">
<?php
while($fila = mysql_fetch_array($rs)){
?>
<tr>
<td width="3%"><span class="Porcentaje"><?php echo $contador++;?></span></td>
<td width="50%"><span class="Porcentaje"><?php echo $fila["apellido_alumno"]." ".$fila["nombre_alumno"]?></span></td>
<td width="2%"><input name="id[]" id="id[]" type="hidden" value="<?php echo $fila["id"]?>"></td>
<td width="2%"><input name="rut_alumno[]" id="rut_alumno[]" type="hidden" value="<?php echo $fila["rut_alumno"]?>"></td>
<td width="2%"><input name="nota1[]" id="nota1[]" type="text" value="<?php echo $fila["nota1"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota2[]" id="nota2[]" type="text" value="<?php echo $fila["nota2"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota3[]" id="nota3[]"type="text" value="<?php echo $fila["nota3"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota4[]" id="nota4[]"type="text" value="<?php echo $fila["nota4"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota5[]" id="nota5[]"type="text" value="<?php echo $fila["nota5"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota6[]" id="nota6[]"type="text" value="<?php echo $fila["nota6"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota7[]" id="nota7[]"type="text" value="<?php echo $fila["nota7"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota8[]" id="nota8[]"type="text" value="<?php echo $fila["nota8"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota9[]" id="nota9[]"type="text" value="<?php echo $fila["nota9"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="2%"><input name="nota10[]" id="nota10[]"type="text" value="<?php echo $fila["nota10"]?>" size="3" maxlength="3" class="Porcentaje"></td>
<td width="5%"><span class="Porcentaje"><?php echo $fila["nota_sem_1"]?></span></td>
<td width="15%"></td>
</tr>
<?php
}?>
<tr>
<td><input name="codigo_asignatura" value="<?php echo $_POST["codigo_asignatura"];?>" type="hidden"></td>
<td><input name="semestre" value="<?php echo $_POST["semestre"];?>" type="hidden"></td>
<td><input name="accion" value="<?php echo $_POST["accion"];?>" type="hidden"></td>
<td><input name="num_total_registros" value="<?php echo $_POST["num_total_registros"];?>" type="hidden"></td>
<div align="right"><input name="enviar2" id="enviar2" type="submit" value="Enviar Notas" class="Porcentaje"></div>
</tr>
</table>
</form>