<?php 

if(isset($_GET['id'])){
    
    $query = query("SELECT * FROM categories WHERE cat_id = " . escape_string($_GET['id']) . " ");
    confirm($query);
    
    while($row = fetch_array($query)){
        
    $cat_title = escape_string($row['cat_title']);
    $cat_type = escape_string($row['cat_type']);
        
    
    }
    
    update_category();
    
}



?>
<div class="col-md-12">

<div class="row">
<h1 class="page-header">
   Izmeni Kategoriju
</h1>
</div>

<form action="" method="post" enctype="multipart/form-data">


<div class="col-md-8">

<div class="form-group">
    <label for="product-title">Naziv kategorije</label>
        <input type="text" name="cat_title" class="form-control"  value="<?php echo $cat_title; ?>">
       
    </div>
    
    <div class="form-group">
    <label for="product-title">Podela 1(party) ili 2(baloni)</label>
        <input type="text" name="cat_type" class="form-control"  value="<?php echo $cat_type; ?>">
       
    </div>


</div><!--Main Content-->


<!-- SIDEBAR-->


<aside id="admin_sidebar" class="col-md-4">

     
     <div class="form-group">
<!--       <input type="submit" name="draft" class="btn btn-warning btn-lg" value="Draft">-->
        <input type="submit" name="update" class="btn btn-primary btn-lg" value="Izmeni">
    </div>





</aside><!--SIDEBAR-->


    
</form>