izbris_ocene.php

Datoteka omogoča brisanje ocene za izbranega dijaka za izbrani predmet.

 

Slika 10 Izbris ocene za izbranega dijaka

 

<form action="index.php?ukaz=redovalnica" method="post">
    <div class="form-group my-3">
        <label class="mb-2 text-secondary form-label" for="vrsta_ocene">Izberi oceno:</label>
        <select name="izbrana_ocena" class="form-select" required>
            <option></option>
            <?php
            $id_dijaka = $_SESSION["id_dijaka"];
            $id_predmeta = $_SESSION["id_predmeta"];
            include "baza.php";
            $conn = new mysqli($server,$username,$password,$baza);
            $conn->set_charset("utf8");
            $sql_ocene = "SELECT id_ocene, ocena, vrsta_ocene, datum, opomba FROM ocene WHERE id_dijaka='".$id_dijaka."' AND id_predmeta='".$id_predmeta."'";
            $ocene_result = $conn->query($sql_ocene);
            $st_ocen = $ocene_result->num_rows;
            $ocene_dijaka = "";
            if ($st_ocen > 0)
            {
                while ($row_ocene = mysqli_fetch_assoc($ocene_result))
                {
                    $vrsta_ocene = $row_ocene['vrsta_ocene'];
                    $datum_ocene = $row_ocene['datum'];
                    $opomba_ocene = $row_ocene['opomba'];
                    $ocena = $row_ocene['ocena'];
                    $ocene_dijaka = $ocena.", ".$vrsta_ocene.", ".$datum_ocene.", ".$opomba_ocene;
                    echo "<option value='".$row_ocene['id_ocene']."'>".$ocene_dijaka."</option>";
                }
            }
            $conn->close();
            ?>
        </select>
    </div>
    <div class="form-group my-3">
        <p>
            <input name="btn_zbrisi_oceno" class="btn btn-success btn-lg" Value="Zbriši" type="submit">&nbsp;
            <a href="index.php?ukaz=redovalnica&preklic=1" class="btn btn-dark btn-lg">Prekliči</a>
        </p>
    </div>
</form>



Created with an evaluation copy of HelpSmith.
To remove this notice, you should purchase the full version of the product.