Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.9 kB
0
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ders_1_Sonuç</title>
</head>
<body>
    <?php
    if(isset($_POST['vize'] , $_POST['final'])){
        $ortalama=($_POST['vize']*0.4)+($_POST['final']*0.6);
        $ortalama= intval($ortalama);

        echo "<label style=\" font-size:25px;\">".$_POST['adsoyad']."</label><br>";
        if ($ortalama>=50) {
            echo "<label style=\"color:green; font-size:20px;\">Geçtiniz.</label><br>";
        }
        else {
            echo "<label style=\"color:red; font-size:20px;\">Kaldınız.</label><br>";
        }

        if ($ortalama>=82) {
            echo "<label style=\"color:green; font-size:20px;\">AA</label>";
        }
        elseif ($ortalama>=74) {
           echo "<label style=\"color:green; font-size:20px;\">BA</label>";
        } 
        elseif ($ortalama>=65) {
            echo "<label style=\"color:green; font-size:20px;\">BB</label>";
        } 
        elseif ($ortalama>=58) {
            echo "<label style=\"color:green; font-size:20px;\">CB</label>";
        }
        elseif ($ortalama>=50) {
            echo "<label style=\"color:green; font-size:20px;\">CC</label>";
        }
        elseif ($ortalama>=40) {
            echo "<label style=\"color:red; font-size:20px;\">DC</label>";
        }
        elseif ($ortalama>=35) {
            echo "<label style=\"color:red; font-size:20px;\">DD</label>";
        }
        elseif ($ortalama>=25) {
            echo "<label style=\"color:red; font-size:20px;\">FD</label>";
        } 
        else {
            echo "<label style=\"color:red; font-size:20px;\">FF</label>";
        }
    }
    else {
        echo "Girdiğiniz bilgileri gözden geçirin. <a href=\"/index.php\">Not Giriş</a>";
    }
    ?>
</body>
</html>
Leave a Comment