PHPPHP Vize ve Final Notuna göre geçme Kalma Durumu Hesaplama

ProxyXF ·

3 yanıt · 742 görüntülenme
#1
php
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>www.tasarimkodlama.com- PHP Örnekleri</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    </head>
    <body>
      <div class="container">
              <?php
               if(isset($_POST["kontrol"]))//kontrol adında bir form nesnesi var mı kontrolü yapılıyor
               {
                   $vize=$_POST["vize"];
                   $final=$_POST["final"];
                   $sonuc=$vize*0.4 + $final*0.6;
                   if($sonuc >= 60 && $final >= 60)
                   {
                       echo "<h1 class='text-info'>$sonuc ,GEÇTİ</h1>";
                   }
                   else
                   {
                       echo "<h1 class='text-danger'>$sonuc ,KALDI</h1>";
                   }
               }     
                ?>
            <hr>
            <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
              <div class="form-group">
                <label for="vize">Vize Notu:</label>
                <input type="text" class="form-control" name="vize">
              </div>
              <div class="form-group">
                <label for="final">Final Notu:</label>
                <input type="text" class="form-control" name="final">
              </div>
              <button type="submit" name="kontrol" class="btn btn-default" >Kontrol Et</button>
            </form>
        </div>
    </body>
</html>
#2
Gerçekten harika bir paylaşım elinize sağlık 💜
👍 1
#3
Teşekkür Ederim.
👍 1
#4
Günceldir
🍥 Sadece1.com | Türkiye'nin Bilgi Platformu
``Proxy`` Full Stack Web Developer

Benzer konular

Yanıt yazmak, gizli içerikleri görmek ve dosya indirmek için giriş yap ya da kayıt ol.
Tekrar hoş geldinTürkiye'nin bilgi ve geliştirici topluluğu