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


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


   

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

        <div class="form-group">
            <label for="exampleInputEmail1">Ukuran</label>
            <input value="<?php echo $r['ukuran'];?>" type="number" max="100" name="ukuran" class="form-control" placeholder="Ukuran" required="required">
        </div>

        <div class="form-group">
            <label for="modelRPP">Posisi</label>
            <select name="align" class="form-control" required="required" style="cursor:pointer;">
                
                <option value="left" <?php if($r['align']=='left'){echo"Selected";}?>>Left</option>
                <option value="center" <?php if($r['align']=='center'){echo"Selected";}?>>Center</option>
                <option value="right" <?php if($r['align']=='right'){echo"Selected";}?>>Right</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>        
