<div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <div class="img-profile ml-3 mt-3">

                    </div>
                    <h1 class="m-0 text-dark"><?php echo (isset($course)) ? 'Edit Course' : 'Edit Course' ?>
                    </h1>

                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<?= base_url(); ?>dashboard/courses">Book</a></li>
                        <li class="breadcrumb-item active"><?php echo (isset($course)) ? 'Edit Book' : 'Edit Book' ?></li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <form method="post" id="add_driver" class="card" action="<?php echo base_url().'course/updatecoursedata' ?>" enctype="multipart/form-data">
        <section class="content">
            <div class="container-fluid">
                <div class="card-body">
                  <?php
                   
                  ?>

                    <div class="row">
                        <input type="hidden" name="id" id="d_id" value="<?php echo (isset($course)) ? $course['id'] : '' ?>">
                        
                        <div class="col-sm-6 col-md-6">
                            <label class="form-label">Title<span class="form-required">*</span></label>
                            <div class="form-group">
                                <input type="text" name="title" id="title" class="form-control" placeholder="Title" required 
                                value="<?php echo (isset($course)) ? $course['title'] : '' ?>">
                            </div>
                        </div>
                        <div class="col-sm-6 col-md-6">
                            <label class="form-label">Price<span class="form-required">*</span></label>
                            <div class="form-group">
                                <input type="text" name="price" id="price" class="form-control" placeholder="Price" required 
                                value="<?php echo (isset($course)) ? $course['price'] : '10' ?>">
                            </div>
                        </div>
                        <div class="col-sm-12 col-md-12">
                            <div class="form-group">
                                <label class="form-label">Description</label>
                                <textarea rows="5" name="description" id="description"
                                 placeholder="Description" class="form-control" required><?php echo (isset($course)) ? $course['description'] : '' ?></textarea>
                            </div>
                        </div>
                        <div class="col-sm-6 col-md-6">
                            <div class="form-group">
                                <label class="form-label">Category<span class="form-required">*</span></label>
                                <select id="categoryId" name="categoryId[]" class="form-control multiselect" multiple required="">
                                  
                                 
                                    <?php
                                      foreach($categories as $key => $category){
                                    ?>
                                    <option value="<?=$key?>"  
                                    <?php 
                                    if (in_array($key, $course['categoryId'])) {
                                      echo "selected";
                                  }
                                    ?>
                                     ><?=$category['title']?></option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
              
                        <div class="col-sm-6 col-md-6">
                            <div class="form-group">
                                <label class="form-label">Feature Image</label>
 
                                 <input type="file" name="image" class="form-control" accept="image/*" placeholder="Video" > 
                            </div>
                        </div>

  
                    </div>

                </div>

            </div>
        </section>
        <section class="content">
            <div class="container-fluid">
                <div class="card-footer text-right">
                    <button type="submit" id="submit" disabled class="btn btn-primary"> <?php echo (isset($vehicledetails) && isset($course)) ? 'Edit Book' : 'Edit Book' ?></button>
                </div>
            </div>
        </section>
    </form>
<script>
    function showRadios() {

$("#teamsSec").hide();
if (document.getElementById('isPro').checked) {
    $("#radiosSec").show();
    $("#specificTeams").prop('checked', false);
    $("#allTeams").prop('checked', true);
} else {
    $("#radiosSec").hide();
}
}

function showTeams() {

if (document.getElementById('specificTeams').checked) {
    $("#teamsSec").show();
} else {
    $("#teamsSec").hide();
}
}

 </script>   