Daftar dan Belajar Sekarang!

function: _error_handler tugas ua

foto saiful31
4 Kontribusi 0 Coto
3 bulan yang lalu
ini linknya jpg kode : <form action="<?= $this->config->base_url().'warga/'.$action.'?id='.$id ?>" method="post">

Tag: php css html

✔ Forum ini sudah terjawab


Jawaban
foto ArfinMustofa
26 Kontribusi 14 Coto
3 bulan yang lalu
coba di var_dump si $action sama si $id nya isi nya kayak apa? kalo bentuk array ndak bisa langsung di echo, harus panggil key nya
answered icon
foto ArfinMustofa
26 Kontribusi 14 Coto
3 bulan yang lalu
coba di var_dump si $action sama si $id nya isi nya kayak apa? kalo bentuk array ndak bisa langsung di echo, harus panggil key nya


foto ArfinMustofa
26 Kontribusi 14 Coto
3 bulan yang lalu
modules/warga/views/form.php

foto saiful31
4 Kontribusi 0 Coto
3 bulan yang lalu
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0 text-dark">Warga</h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="#">Home</a></li>
            <li class="breadcrumb-item">Warga</li>
            <li class="breadcrumb-item active">Tambah Warga</li>
          </ol>
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>
  <!-- /.content-header -->

  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
      <?php $id = isset($id) ? $id : ''?>
      <form action="<?= $this->config->base_url().'warga/'.$action.'?id='.$id ?>" method="post">

        <h2 class="m-3 text-dark">DATA KEPENDUDUKAN</h2>

        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NO RUMAH</label>
          <div class="col-sm-4">
            <input type="text" name="no_rumah" class="form-control" size="4" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NIK</label>
          <div class="col-sm-4">
            <input type="text" name="id" class="form-control" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NAMA KEPALA KELUARGA</label>
          <div class="col-sm-4">
            <input type="text" name="nama_kepala" class="form-control" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NAMA ISTRI</label>
          <div class="col-sm-4">
            <input type="text" name="istri" class="form-control" size="4" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NAMA ANAK PERTAMA</label>
          <div class="col-sm-4">
            <input type="text" name="anak1" class="form-control" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NAMA ANAK KEDUA</label>
          <div class="col-sm-4">
            <input type="text" name="anak2" class="form-control" required>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">JUMLAH KELUARGA</label>
          <div class="col-sm-4">
            <input type="text" name="jumlah_keluarga" class="form-control" size="4" required>
          </div>
        </div>

        <div class="form-group row">
          <label class="col-sm-2 col-form-label">AGAMA</label>
          <div class="col-sm-4">
            <select name="agama" class="form-control" required>
              <option value="">AGAMA</option>
              <option value="ISLAM">ISLAM</option>
              <OPTION VALUE="KRISTEN">KRISTEN</OPTION>          
              <OPTION VALUE="HINDU">HINDU</OPTION> 
              <OPTION VALUE="BUDHA">BUDHA</OPTION> 
              <OPTION VALUE="DLL">DLL</OPTION> 

            </select>
          </div>
        </div>

        <div class="form-group row">
          <label class="col-sm-2 col-form-label">PEKERJAAN</label>
          <div class="col-sm-4">
            <select name="pekerjaan" class="form-control" required>
              <option value="">PEKERJAAN</option>
              <option value="KARYAWAN SWASTA">KARYAWAN SWASTA</option>
              <OPTION VALUE="PNS">PNS</OPTION>          
              <OPTION VALUE="WIRAUSAHA">WIRAUSAHA</OPTION> 
              <OPTION VALUE="DLL">DLL</OPTION> 
            </select>
          </div>
        </div>

        <div class="form-group row">
          <label class="col-sm-2 col-form-label">WARGA NEGARA</label>
          <div class="col-sm-4">
            <select name="warga_negara" class="form-control" required>
              <option value="">WARGA NEGARA</option>
              <option value="WNI">WNI</option>
              <OPTION VALUE="WNA">WNA</OPTION>          
            </select>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">NOMOR TELPON</label>
          <div class="col-sm-4">
            <input type="text" name="nomor_telpon" class="form-control" size="4" required>
          </div>
        </div>

        <div class="form-group row">
          <label class="col-sm-2 col-form-label">STATUS RUMAH</label>
          <div class="col-sm-4">
            <select name="status" class="form-control" required>
              <option value="">STATUS RUMAH</option>
              <option value="Milik Sendiri">Milik Sendiri</option>
              <OPTION VALUE="SEWA">SEWA</OPTION>          
            </select>
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-2 col-form-label">&nbsp;</label>
          <div class="col-sm-4">
            <input type="submit" name="submit" class="btn btn-primary" value="SIMPAN">
          </div>
        </div>
      </form>
    </div>


  </form>
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
-->  <!-- /.content-wrapper -->

<script type="text/javascript">
  $(document).ready(function() {
    const Toast = Swal.mixin({
      toast: true,
      position: 'top-end',
      showConfirmButton: false,
      timer: 3000
    });

    <?php if ($message) { ?>
      Toast.fire({
        type: 'error',
        title: <?= json_encode($message) ?>
      })
    <?php } ?>
  })
</script>

foto ArfinMustofa
26 Kontribusi 14 Coto
3 bulan yang lalu
<?php var_dump($action); echo "<br>"; var_dump($id); die();?> taro di paling atas, lihat ada isi nya ndak

foto saiful31
4 Kontribusi 0 Coto
3 bulan yang lalu
tidak bisa malah error codingnya


Login untuk diksusi di forum sekolah koding