Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
function: _error_handler tugas ua
6 Jawaban:
Jawaban Terpilih
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
<a href='http://prntscr.com/qit0gz'>saya tidak mengerti dimana var_dum saya upload gambarnya di class apa?</a>
<pre> <!-- 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">
&lt;h2 class="m-3 text-dark"&gt;DATA KEPENDUDUKAN&lt;/h2&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NO RUMAH&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="no_rumah" class="form-control" size="4" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NIK&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="id" class="form-control" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NAMA KEPALA KELUARGA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="nama_kepala" class="form-control" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NAMA ISTRI&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="istri" class="form-control" size="4" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NAMA ANAK PERTAMA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="anak1" class="form-control" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NAMA ANAK KEDUA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="anak2" class="form-control" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;JUMLAH KELUARGA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="jumlah_keluarga" class="form-control" size="4" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;AGAMA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;select name="agama" class="form-control" required&gt;
&lt;option value=""&gt;AGAMA&lt;/option&gt;
&lt;option value="ISLAM"&gt;ISLAM&lt;/option&gt;
&lt;OPTION VALUE="KRISTEN"&gt;KRISTEN&lt;/OPTION&gt;
&lt;OPTION VALUE="HINDU"&gt;HINDU&lt;/OPTION&gt;
&lt;OPTION VALUE="BUDHA"&gt;BUDHA&lt;/OPTION&gt;
&lt;OPTION VALUE="DLL"&gt;DLL&lt;/OPTION&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;PEKERJAAN&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;select name="pekerjaan" class="form-control" required&gt;
&lt;option value=""&gt;PEKERJAAN&lt;/option&gt;
&lt;option value="KARYAWAN SWASTA"&gt;KARYAWAN SWASTA&lt;/option&gt;
&lt;OPTION VALUE="PNS"&gt;PNS&lt;/OPTION&gt;
&lt;OPTION VALUE="WIRAUSAHA"&gt;WIRAUSAHA&lt;/OPTION&gt;
&lt;OPTION VALUE="DLL"&gt;DLL&lt;/OPTION&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;WARGA NEGARA&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;select name="warga_negara" class="form-control" required&gt;
&lt;option value=""&gt;WARGA NEGARA&lt;/option&gt;
&lt;option value="WNI"&gt;WNI&lt;/option&gt;
&lt;OPTION VALUE="WNA"&gt;WNA&lt;/OPTION&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;NOMOR TELPON&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="text" name="nomor_telpon" class="form-control" size="4" required&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;STATUS RUMAH&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;select name="status" class="form-control" required&gt;
&lt;option value=""&gt;STATUS RUMAH&lt;/option&gt;
&lt;option value="Milik Sendiri"&gt;Milik Sendiri&lt;/option&gt;
&lt;OPTION VALUE="SEWA"&gt;SEWA&lt;/OPTION&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group row"&gt;
&lt;label class="col-sm-2 col-form-label"&gt;&nbsp;&lt;/label&gt;
&lt;div class="col-sm-4"&gt;
&lt;input type="submit" name="submit" class="btn btn-primary" value="SIMPAN"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
</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 });
&lt;?php if ($message) { ?&gt;
Toast.fire({
type: 'error',
title: &lt;?= json_encode($message) ?&gt;
})
&lt;?php } ?&gt;
}) </script> </pre>
<?php var_dump($action); echo "<br>"; var_dump($id); die();?> taro di paling atas, lihat ada isi nya ndak
<a href='http://prntscr.com/qitahc'>http://prntscr.com/qitahc</a>
<a href='http://prntscr.com/qitb9d'>codingnya</a>