<?php include 'header.php'; ?>
<?php
include '../koneksi.php';

?>


<div id="wrapper">
    <!-- Sidebar -->
    <!-- Tambahkan Sidebar sesuai template SB Admin -->
    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">
        <!-- Main Content -->
        <div id="content">
            <!-- Topbar -->
            <!-- Tambahkan Topbar sesuai template SB Admin -->

            <!-- Begin Page Content -->
            <div class="container-fluid">
                <!-- Page Heading -->
                <h1 class="h3 mb-4 text-gray-800">Data Dokter</h1>
                 
                <!-- Form Tambah Album -->
                <div class="card shadow mb-4">
                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary">Tambah Dokter</h6>
                    </div>
                    <div class="card-body">
            
                        <form action="dokter_act.php" method="post" enctype="multipart/form-data">
                            
                            <div class="form-group mb-3">
                                <label for="artist_id">Nama Dokter</label>
                                <input type="text" class="form-control" id="artist_id" name="nama_dokter" placeholder="Masukkan Nama Dokter" required>
                            </div>
                            <div class="form-group mb-3">
                                <label for="artist_id">Spesialis</label>
                                <input type="text" class="form-control" id="artist_id" name="spesialis" placeholder="Masukkan Nama Spesialis" required>
                            </div>
                            
                            <div class="form-group mb-3">
                                <label for="release_date">Keterangan</label>
                                <input type="text" class="form-control" id="release_date" name="keterangan" required>
                            </div>
                            <div class="form-group">
        <label for="id_poli">Poli</label>
        <select class="form-control" id="id_poli" name="id_poli" required>
            <?php
            // Mengambil daftar dokter dari database
            $poli_query = mysqli_query($koneksi, "SELECT id_poli, nama_poli FROM tbl_poli");
            while ($poli = mysqli_fetch_assoc($poli_query)) {
                echo "<option value='" . $poli['id_poli'] . "'>" . $poli['nama_poli'] . "</option>";
            }
            ?>
        </select>
    </div>
                            

              <div class="form-group">
                  <div class="row">
                     <div class="col-lg-2">
                <input type="submit" class="btn btn-sm btn-primary" value="Simpan">
              </div>

            </form>
                </div>
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- End of Main Content --><?php include 'footer.php'; ?>