<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Toplu Veri Girişi</title>

<style>
* {
  box-sizing: border-box;
}

input[type=text],[type=date], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

input[type=submit] {
  background-color: #4CAF50;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  float: right;
  margin-top:5px;

}

input[type=submit]:hover {
  background-color: #45a049;
}

.ana {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
}

.col-25 {
  float: left;
  width: 25%;
  margin-top: 6px;
}

.col-75 {
  float: left;
  width: 75%;
  margin-top: 6px;
}

/* Clear floats after the columns */
.satir:after {
  content: "";
  display: table;
  clear: both;
  padding:10px;
}

/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .col-25, .col-75, input[type=submit] {
    width: 100%;
    margin-top: 5px;
  }
}
</style>

</head>

<body>
    <?php include 'menu.php';?>
<h1 align="center">Toplu Veri Girişi</h1>
<div class="ana">
    <form action="toplubilgikayit.php"  method="POST">
        <div class="satir">
    Lütfen yanıtlayacağınız soruyu seçin: <select name="soru">
              <option value="oyuno oynama">Oyunlara Katılma Durumu</option>
              <option value="kahvaltı">Kahvaltı</option>
              <option value="öğle yemeği">Öğle Yemeği</option>
              <option value="ikindi yemeği">İkindi Yemeği</option>
              <option value="uyku uyuma ">Uyuma Miktarı</option>
    </select><br>
    <input type="date" value="<?php echo date('Y-m-d'); ?>" name="tarih"><br>
    </div>
    <div class="ana">
    </div>
            <?php
            
        //veritabanı bağlantısı
        
        $servername = "localhost";
        $database = "wwwhepsam_wp745";
        $username = "wwwhepsam_wp745";
        $password = ")8b9-hS65p";
        // Create connection
        $conn = mysqli_connect($servername, $username, $password, $database);
        // Check connection
        if (!$conn) {
            die("Connection failed: " . mysqli_connect_error());
        }
        mysqli_set_charset($conn, "utf8");
        //veritabanı bağlantı bitiş
    
            
            
            
         $sorgu = $conn->query("SELECT * FROM ogrenci"); 
        while ($sonuc = $sorgu->fetch_assoc()) { 
        $ogrenciadi = $sonuc['ogrenciadi']; 
        $id = $sonuc['id']; 
        //echo "<br>Öğrenci İsimleri: ";
        ?>
        
            <div class="satir">
      <select name="$ogrenciadi"><option value="$ogrenciadi"><?php echo $ogrenciadi; ?></option><option value="Gelmedi">Gelmedi</option></select>
    <select name="ogrenci<?php echo $id; ?>"><option value="İdeal">İdeal</option><option value="Düşük">Düşük</option><option value="Yüksek">Yüksek</option></select>
      <input type="radio" name="onem<?php echo $id; ?>" value="0" checked> Sıradan
      <input type="radio" name="onem<?php echo $id; ?>" value="1"> Önemli<br>
    </div>
        
        <?php
        //echo $ogrenciadi;
        }
        ?>
    

    <div class="satir">

    </div>

      <input type="submit" value="Kaydet">
    </form>
    
    <label><a align="center" href="ogrencibilgi.php">Girilmiş Bilgileri Görüntüle</a></label>
    <label><a align="center" href="bilgigir.php">Detaylı Bilgi Giriş</a></label>
</div>
<p align="center" style=" padding-top:100px;">Güç İçinde!</p>

</body>
</html>
