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

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

                </div><!-- /.col -->
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<?= base_url(); ?>dashboard/categories">Categories</a></li>
                        <li class="breadcrumb-item active"><?php echo (isset($category)) ? 'Edit Category' : 'Add Category' ?></li>
                    </ol>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </div>
    <?php
      if(isset($category)){
        $endpoint = 'updatecategory';
      }else{
        $endpoint = 'insertcategory';
      }
    ?>
    <form method="post" id="add_driver" class="card" action="<?php echo base_url() . "dashboard/".$endpoint; ?>" enctype="multipart/form-data">
        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="card-body">


                    <div class="row">
                        <input type="hidden" name="id" id="id" value="<?=$id?>">

                        <div class="col-sm-6 col-md-3">
                            <label class="form-label">Category Name<span class="form-required">*</span></label>
                            <div class="form-group">
                                <input type="text" name="title" id="title" class="form-control" placeholder="Category Title" value="<?php echo $category['title'];?>">
                            </div>
                        </div>

                        <!-- <div class="col-sm-6 col-md-3">
                            <label class="form-label">Image<span class="form-required">*</span></label>
                            <div class="form-group">
                                <input type="file" name="image" id="image" class="form-control">
                            </div>
                        </div> -->

                    </div>

                </div>

            </div>
        </section>
        <!-- /.content -->


        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">

                <div class="card-footer text-right">

                    <button type="submit" class="btn btn-primary"> <?php echo (isset($category)) ? 'Update Category' : 'Add Category' ?></button>
                </div>
            </div>
        </section>
        <!-- /.content -->
    </form>