How to edit a record and update immediately

0

How do I edit the value of presence ('P', 'F')

and update in the database

<table  class="pauta">
    <?php 
    $consultaAluno=mysqli_query($conexao,"SELECT a.matriculaAluno, a.nomeAluno,aht.turma_codigoTurma FROM aluno a,aluno_has_turma aht WHERE a.matriculaAluno=aht.aluno_matriculaAluno AND aht.turma_codigoTurma='$codigoTurma'");
    $rowAluno = mysqli_num_rows($consultaAluno);
    $cont=0;
        while ($cont < $rowAluno){
                $linhaAluno=mysqli_fetch_assoc($consultaAluno);
            echo ("<tr>
                <td rowspan='2' style='width: 15%'>".$linhaAluno['matriculaAluno']."</td>
                <td rowspan='2' style='width: 40%'>".$linhaAluno['nomeAluno']."</td>
                <td rowspan='2' style='width: 10%'>11</td>

                </tr>");
                $matriculaAluno=$linhaAluno['matriculaAluno']?$linhaAluno['matriculaAluno']:"";
            $consultaPresenca=mysqli_query($conexao,"SELECT p.presenca FROM pauta p, aluno_has_pauta ahp, aluno a WHERE '$matriculaAluno' = a.matriculaAluno AND ahp.pauta_idPauta = p.idPauta AND '$matriculaAluno' = ahp.aluno_matriculaAluno");
            $rowPresenca = mysqli_num_rows($consultaPresenca);
            $contP=0;
            echo ("<tr>");
            while($contP < $rowPresenca){
                **$linhaPresenca=mysqli_fetch_assoc($consultaPresenca);
                $presenca=$linhaPresenca['presenca'];
                    echo ("<td>".$presenca."</td>");**

                $contP++;
            }
            echo ("<tr>");
            $cont++;
            };

            ?>
    </table>

You are now as follows, like the user to edit the presence.

    
asked by anonymous 20.05.2018 / 00:14

0 answers