controlller site.php
public function ctambahpelangganpage() {
$data['content'] = 'vdisduk/vpelanggan/vform';
$this->load->view('vtemplate/template',$data);
}
--------------------------
vform.php
<form action="/action_page.php">
<div class="form-group">
<label for="nama">Nama Pelanggan:</label>
<input type="text" class="form-control" id="nama" name="detail" placeholder="Isikan nama">
</div>
<div class="form-group">
<label for="kota">Kota Pelanggan:</label>
<input type="text" class="form-control" id="kota" name="kota" placeholder="Isikan kota">
</div>
<div class="form-group">
<label for="detail">Detail Pelanggan:</label>
<textarea class="form-control" rows="5" id="detail" name="detail">></textarea>
</div>
<button type="submit" class="btn btn-primary">Tambah</button>
<button type="reset" class="btn btn-primary">Reset</button>
</form>
--------------------------------------------
vlistpelanggan.php
<div class="container">
<a href="<?php echo base_url()?>site/ctambahpelangganpage" class="btn btn-primary">Tambah </a>
<p>
<table class="table table-striped">
<tr>
<th>ID Pelanggan </th>
<th>NAMA </th>
<th>KOTA</th>
<th>Admin</th>
</tr>
<?php foreach($varpelanggan as $key => $value) { ?>
<tr>
<td><?php echo $value['idpelanggan']; ?> </td>
<td><?php echo $value['namapelanggan']; ?> </td>
<td><?php echo $value['kotapelanggan']; ?> </td>
<td><a href="#" class="btn btn-success">Edit </a>
<a href="#" class="btn btn-warning"> Del </a>
<a href="<?php base_url();?>index.php/site/cdetailpelanggan/<?php echo $value['idpelanggan']; ?>" class="btn btn-danger"> More</a>
</td>
</tr>
<?php } ?>
</table>
</div>
}
Call/ SMS/WA : 081.223344.506 , BBM : 7DC633AA
Social Net :
Hometown : Bandung - Jawa Barat
Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.
No comments:
Post a Comment