<?php $this->load->view('admin/layout/meta'); ?>
<?php $this->load->view('admin/layout/header'); ?>
<?php $this->load->view('admin/layout/aside'); ?>

<?php
if($cek=='edit'){
 foreach($edit->result() as $row){ 
 $idbidang = $row->idbidang;
 $namabidang = $row->namabidang;

 }
}
?>
  <main id="main" class="main">
    <div class="pagetitle">
      <h1>Bidang</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item active">bidang</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->
    <section class="section dashboard">
      <div class="row">
        <!-- Left side columns -->
        <div class="col-lg-12">
          <div class="row">
          <div class="card">
            <div class="card-body">
                  <h5 class="card-title">Bidang<span></span></h5>
				  <?php 	
			$attribute = array('role' => 'form', 'class' => 'form-horizontal','enctype'=>'multipart/form-data','method'=>'post');
			echo form_open(base_url().'admin/bidang/save', $attribute); 
			?>
			<input type="hidden" class="form-control" id="inputText" name="idbidang" value="<?php if($cek=='edit'){ echo $idbidang;}else{ echo '';}?>">
                <div class="row mb-3">
                  <label for="inputEmail3" class="col-sm-2 col-form-label">Nama bidang</label>
                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputText" name="namabidang" value="<?php if($cek=='edit'){ echo $namabidang;}?>">
                  </div>
                </div>		
                <div class="row mb-3">
                  <label for="inputEmail3" class="col-sm-2 col-form-label"></label>
                  <div class="col-sm-10">
                     <button type="submit" class="btn btn-primary" name="button">Simpan</button>
                  </div>
                </div>
             <?php echo form_close(); ?><!-- End Horizontal Form -->

                </div>
				</div>
              </div>
            </div><!-- End Recent Sales -->

          </div>
        </div><!-- End Left side columns -->
      </div>
    </section>
  </main><!-- End #main -->
<?php $this->load->view('admin/layout/foot'); ?> 