I have a problem when making a dynamic update in my table of notes when doing it in php, with this I get to show me the name of the student and his note
<table>
<th>Alumno</th>
<th>Calificación</th>
<form action="./ej2.php" method="post">
<?php
$sql = "SET NAMES utf8";
$resultado = mysqli_query($conn, $sql);
$codigo=$_REQUEST["codigo"];
$sql = "Select alumnado.nombre AS Alumno, notas.notas from alumnado inner join notas on alumnado.dni=notas.dni
INNER JOIN asignaturas on asignaturas.cod_asignatura=notas.codigo_nota
where cod_asignatura='$codigo'
order by nombre";
$resultado = mysqli_query($conn,$sql);
while ($fila = mysqli_fetch_assoc($resultado)){
echo "<tr>";
echo "<td>" . $fila["Alumno"]. "</td>";
echo "<td><input type='number' min='1' max='10' name=".$fila=['notas'].$i++." value='".$fila['notas']."'></td></br>";
echo "</tr>";
pero a la hora del update no se que hacer ya, no logro que actualize todo, este es el codigo de update que tengo
<?php
$codigo=$_REQUEST["codigo"];
if(isset($_POST['actualizar']))
{
foreach($_POST['notas'].$i++ as $nota)
{
$editnota=mysqli_real_escape_string($conn, $_POST['notas'][$nota]);
$actualizar="UPDATE notas SET notas='$editnota' WHERE notas='$nota'";
echo $editnota;
}
}
?>