                  <div class="col-xl-12 col-xxl-12 col-sm-12">
                                    <div class="card">
                                        <div class="card-header">
                                            <h5 class="card-title">Add Attendance</h5>
                                        </div>
                                        <div class="card-body">
                                           <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_tap_out", 'id'=>"add_tap_out")); ?>  


                                          <?php if($this->session->flashdata('tap_out_success')){ ?>
                                                <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('tap_out_success'); ?></div>
                                            <?php } ?>

                                             <div id='tap_out_success' class='alert alert-success solid' style='display:none;'></div>
                                                    <div class="row">
                                                        
                                                         
                                                    	 
                                                         <div class="col-lg-6 col-md-6 col-sm-12">
                                                            <div class="form-group">
                                                                <label class="form-label">Empolyee</label>
                                                                <input type="text" name="emp_id" id="emp_id" value="<?php echo fullname($get_emp_all[0]['emp_id']); ?>" disabled="disabled"  class="form-control">
                                                            </div>
                                                        </div> 


                                                     <div class="col-lg-6 col-md-6 col-sm-12">
                                                            <div class="form-group">
                                                                <label class="form-label">Date Out</label>
                                                                <input type="date" name="date_out" id="date_out" required="required"  class="form-control">
                                                            </div>
                                                        </div>


                                                        

                                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                                            <div class="form-group">
                                                                <label class="form-label">Tap Out</label>
                                                               <input type="time" name="tap_out"  id="settime"  class="form-control" ">
                                                            </div>
                                                        </div>



                                                        
                                                    </div>

                                                <?php form_close(); ?>

                                               
                                                 <button type="submit" id="emp_add" class="btn btn-primary">Submit <i class="icon-arrow-right14 position-right"></i></button>
                                            </div>
                                        </div>
                                    </div>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

     <script type="text/javascript">


     var add_tap_out = $('#add_tap_out');   
    
    add_tap_out.on('submit',function(e){
     

        e.preventDefault();
        
        var edit_add_tap_out = add_tap_out.serialize();
        
        var id = $('#emp_id').val();

            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Admin/tap_out_attendance/');?>'+id,
                data:edit_add_tap_out,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#tap_out_success').show().html('Tap Out Update Successfully').hide(3000);
                       setTimeout(function(){location.href="<?php echo base_url('Admin/add_attendance/'); ?>"+id} , 3000);
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });

                                    </script>