<?php 
session_start();
include"../../../../inc/conn.php";
$id         = $_POST['id'];
$q=mysqli_query($connect,"select * from tb_unit where id_unit='".$id."'");
$r=mysqli_fetch_array($q);
?>


    <form action="updatemodul" method="POST">
            
        <input type="hidden" name="id_unit" value="<?php echo $r['id_unit'];?>">


   

        <div class="form-group">
            <label for="exampleInputEmail1">Judul Unit</label>
            <input value="<?php echo $r['judul_unit'];?>" type="text" name="judul_unit" class="form-control" placeholder="Masukkan judul unit" required="required">
        </div>

        <div class="form-group">
            <label for="inputName" class="col-sm-12 col-form-label">Status Unit</label>
            <select class="form-control" name="aktif" required="required" style="cursor:pointer;">
                <option value="1" <?php if($r['aktif']=='1'){echo"selected";}?>>Aktif</option>
                <option value="0" <?php if($r['aktif']=='0'){echo"selected";}?>>Tidak Aktif</option>
            </select>
        </div>


        <div class="modal-footer justify-content-between">
              
              <button type="submit" class="btn btn-primary">Simpan</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        
        </div>

       
        </form>        
