    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
    <!--data table--> 
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/pdfmake-0.1.18/dt-1.10.12/b-1.2.2/b-colvis-1.2.2/b-html5-1.2.2/b-print-1.2.2/r-2.1.0/datatables.min.css" /> 
    <script type="text/javascript" src="https://cdn.datatables.net/v/bs/pdfmake-0.1.18/dt-1.10.12/b-1.2.2/b-colvis-1.2.2/b-html5-1.2.2/b-print-1.2.2/r-2.1.0/datatables.min.js"></script> 
    <!--/.data table--> 
 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Users Massages</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">Users Massages</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-12">
          <div class="card">
            <div class="card-header">
              <h3 class="card-title">All Customers Massages</h3>
            </div>
                <?php
                    $msg = $this->session->flashdata('success');
                    $msg1 = $this->session->flashdata('error');
                    if(isset($msg)){
                ?>
                <div class="alert alert-success">
                    <a href="#" class="close" data-dismiss="alert" aria-label="close">X</a>
                    <?php echo $this->session->flashdata('success');?>
                </div>
                <?php }?>
                <?php
                    if(isset($msg1)){
                ?>
                <div class="alert alert-danger">
                    <a href="#" class="close" data-dismiss="alert" aria-label="close">X</a>
                    <?php echo $this->session->flashdata('error');?>
                </div>
                <?php }?>
                <div class="data-table-list">
                    <div class="basic-tb-hd">
                        <h2>Users Massages</h2>
                        <p>Customers Massages </p>
                    </div>
                    <div class="table-responsive">
                        <table id="mytable" class="table table-striped">
                            <thead>
                            <tr>
                                <th>Name</th>
                                <th>Email</th>
								<th>Contact Number #</th>
                                <th>Message</th>
                                <th>Date</th>
                                <th>Action</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php
                                $sql = $this->db->get('contect_us');
                                if($sql->num_rows() > 0){
                                $result = $sql->result();
                                foreach ($result as $row){

                            ?>
                            <tr>
                                <td><?php echo $row->name;?></td>
                                <td><?php echo $row->email;?></td>
								 <td><?php echo $row->contact_no;?></td>
                                <td><?php echo $row->message;?></td>
                                <td><?php echo $row->date;?></td>
                                <td><a href="<?php echo base_url('admin/View_user_massages/delete/').$row->id;
                                ?>" class="btn btn-danger"><i class="fa fa-trash"></i> Delete</a></td>
                            </tr>
                                <?php } }?>

                            </tbody>
                       </table>
            </div>
            <!-- /.card-body -->
          </div>
		  </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
 <script type="text/javascript"> 
        $(document).ready(function() { 
            $("#mytable").dataTable(); 
        }); 
    </script>