<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Borç 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';?>
    <?php include '../baglanti.php';?>


<form method="POST" action="gelirlistesikayit.php">
   
   
           <div class="satir">
            Ana Kategori: <select name="soru">
              <option value="<?php echo $soru; ?>"><?php echo $soru; ?></option>
              <option value="Aidat">Aidat</option>
              <option value="Kırtasiye">Kırtasiye</option>
              <option value="Oyuncak">Oyuncak</option>
              <option value="Gezi">Gezi</option>
              </select><br>
            </div>
            
           <div class="satir">
            Alt Kategori: <select name="soru">
              <option value=""></option>
              <option value="Kasım">Kasım</option>
              <option value="Aralık">Aralık</option>
              </select><br>
            </div>
            
<?php            
         $sorgu = $conn->query("SELECT * FROM ogrenci"); 

    //sınıf bilgisi çekme alanı bitiş

        //kayıt sayfasına sıralı veri girişi için gerekli alan    
        $i=0;   
            
        // $sorgu = $conn->query("SELECT * FROM ogrenci WHERE sinif='$sinif' "); üst kısımda if içerisine yerleştirildi
                while ($sonuc = $sorgu->fetch_assoc()) { 
                $ogrenciadi = $sonuc['ogrenciadi'];
                $aidat = $sonuc['aidat'];
                $aidatgunu = $sonuc['aidatgunu'];
                $id = $sonuc['id']; 
                $i=$i+1;
                //echo "<br>Öğrenci İsimleri: ";
                echo  date('Y-m-'.$aidatgunu.'');
                //echo $aidatgunu;
                ?>
                <div class="satir">
                <input type="text" value="<?php echo $ogrenciadi; ?>" name="<?php echo $i; ?>" readonly>
                <input type="text" value="<?php echo $aidat; ?>" name="<?php echo $i."numara"; ?>">
                <input type="date" value="<?php echo date('Y-m-'.$aidatgunu.''); ?>" name="<?php echo $i."numara"; ?>">

                </div>
    <?php 
                }
    ?>



<input type="submit" value="Submit">

</form>

</body>

<p align="center" style=" padding-top:100px;">Güç İçinde!</p>



</html>

