Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/06/2010, 14:49
Alfredoncho
 
Fecha de Ingreso: diciembre-2009
Mensajes: 8
Antigüedad: 14 años, 4 meses
Puntos: 0
Ayuda con Arrays

buenas tarde este es mi html
Código HTML:
<table width="634" border="1">
              <tr>
                <td colspan="3" align="center"><strong><?php echo $kl[2]; ?></strong></td>
                <td colspan="3" align="center"><strong><?php echo "Profesor ".$kl[4]; ?></strong></td>
              </tr>
              <tr>
                <td width="116" align="center"><strong>Codigo Alumno</strong></td>
                <td width="146" align="center"><strong>Promedio Practicas</strong></td>
                <td width="103" align="center"><strong>Nota Parcial</strong></td>
                <td width="81" align="center"><strong>Nota Final</strong></td>
                <td width="105" align="center"><strong>Pomedio Final</strong></td>
                <td width="43">
                </td>
              </tr>
              <?php
			  
			  $z='select * from d_al_cur where id_d_cur_prof=\''.$id.'\'';
			  $v=mysql_query($z);
			  while($n=mysql_fetch_array($v)){
              echo "<tr>";
                echo "<td><input type=text id=alumno$n[1] value=$n[1] readonly=readonly/></td>";
                echo "<td><input type=text id=pp$n[1] value=$n[7]></td>";
echo "<td><input type=text id=np$n[1] value=$n[8]></td>";
echo "<td><input type=text id=nf$n[1] value=$n[9]></td>";
echo "<td><input type=text id=pf$n[1] value=$n[10]></td>";
echo "<td><a href=_enotas.php?ide=$n[0]>ENVIAR</a></td>";
              echo "</tr>";
			  }
			  
			  ?>
            </table> 
y este es mi php
Código PHP:
$a=$_REQUEST['ide'];
$b=$_REQUEST['pp$n[1]'];
$c=$_REQUEST['np$n[1]'];
$d=$_REQUEST['nf$n[1]'];
$e=$_REQUEST['pf$n[1]'];
$h=$b*0.4+$c*0.3+$d*0.3;
//echo $b;
$g="UPDATE d_al_cur SET prom_parct='$b',parcial='$c',final='$d',nota_final='$h' WHERE id_d_al_cur='$a'";
$r=mysql_query($g);

if(
$r==true){
        
header('location: notas.php?id=10');
    }else{  echo 
"Error al insertar <br/> $sql";
    } 
quiero insterarloso actualizar datos en mi tabla pero no me agarra los valores en las cajas....me dijeron q hiciera una extraccion de arrays y un for each pero no tengo idea como hacerlo
Si alguien me puediera ayudare seria execelnte