<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <div class="img-profile ml-4">
         
        </div>
        <h1 class="m-0 text-dark"><?php echo (isset($customerdetails)) ? 'Edit Customer' : 'Edit Customer' ?>
        </h1>
      </div><!-- /.col -->
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item"><a href="<?= base_url(); ?>/dashboard">Customer</a></li>
          <li class="breadcrumb-item active"><?php echo (isset($customerdetails)) ? 'Edit Customer' : 'Add Customer' ?></li>
        </ol>
      </div><!-- /.col -->
    </div><!-- /.row -->
  </div><!-- /.container-fluid -->
</div>
<!-- Main content -->
<section class="content">
  <div class="container-fluid">
    <form method="post" id="customer_add" class="card" action="<?php echo base_url() . "customer/updatecustomerdata/".$id; ?>">
      <div class="card-body">

        <div class="row">
          <?php
          //  echo "<pre>";
          //  print_r($customerdetails);
          // echo "</pre>";
           ?>

          <div class="col-sm-6 col-md-3">
            <div class="form-group">
              <label class="form-label">Full Name<span class="form-required">*</span></label>
              <input type="text" required="true" class="form-control" value="<?php echo (isset($customerdetails)) ? $customerdetails['fullname'] : '' ?>" id="c_name" name="fullname" placeholder="Customer Name">
            </div>
          </div>
          <div class="col-sm-6 col-md-3">
            <div class="form-group">
              <label class="form-label">Phone<span class="form-required">*</span></label>
              <input type="text" required="true" value="<?php echo (isset($customerdetails)) ? $customerdetails['userPhone'] : '' ?>" class="form-control" name="userPhone" placeholder="Customer Name">
            </div>
          </div>
          <div class="col-sm-6 col-md-3">
            <div class="form-group">
              <label class="form-label">Date Of Birth<span class="form-required">*</span></label>
              <input type="date" required="true" class="form-control" value="<?php echo (isset($customerdetails)) ? $customerdetails['dateOfBirth'] : '' ?>" id="c_mobile" name="dateOfBirth" placeholder="Customer Date Of Birth">
            </div>
          </div>
          <div class="col-sm-6 col-md-4">
            <div class="form-group">
              <label class="form-label">Email</label>
              <input type="text" readonly required="true" class="form-control" value="<?php echo (isset($customerdetails)) ? $customerdetails['email'] : '' ?>" id="c_email"  placeholder="Customer Email">

            </div>
          </div>
       

            <div class="col-sm-6 col-md-6">
              <div class="form-group">
                <label class="form-label">Password<span class="form-required">* <span style="color:red;">if you fill this field password will b changed</span></span></label>
                <input class="form-control"  id="c_password" autocomplete="off" type="password" placeholder="Password" name="newpassword" minlength="6">
                <input type="hidden" name="password" value ="<?php echo $customerdetails['password'] ?>" />
              </div>
            </div>
            <div class="col-sm-12 col-md-12">
              <div class="form-group">
                <label class="form-label">Bio<span class="form-required">* </span></label>
                <textarea class="form-control"   placeholder="userBio" name="userBio" ><?php echo $customerdetails['userBio'] ?></textarea>
                
              </div>
            </div>

          




        </div>
        
        <div class="modal-footer">

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