Kuis - Fajar Adi Setyawan - 12180016 - Web Programing 2
Kuis - Fajar Adi Setyawan - 12180016 - Web Programing 2
Kuis - Fajar Adi Setyawan - 12180016 - Web Programing 2
NIM: 12180016
Kelas: 12.6B.05
Kuis Web Programing II
View/v_home
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Form Pembelian</h1>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
View/v_hasil
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Struk Pembelian</h1>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
Controller/home
<?php
$this->form_validation->set_rules(
'no',
'no hp',
'required|min_length[11]',
[
'required' => 'No HP Harus diisi',
'min_length' => 'No HP terlalu pendek'
]
);
$name = $this->input->post('name', true);
$no = $this->input->post('no', true);
$merek = $this->input->post('merek', true);
$size = $this->input->post('size', true);
if ($this->input->post('merek') == 'Nike') {
$harga = 375000;
} elseif ($this->input->post('merek') == 'Adidas') {
$harga = 300000;
} elseif ($this->input->post('merek') == 'Kickers') {
$harga = 250000;
} elseif ($this->input->post('merek') == 'Eiger') {
$harga = 275000;
} elseif ($this->input->post('merek') == 'Bucherri') {
$harga = 400000;
}
$data = [
'nama' => $name,
'no' => $no,
'merek' => $merek,
'size' => $size,
'harga' => $harga,
'isi' => 'v_hasil',
'title' => "Toko Sepatu",
];
Print Hasil
Controller/Pertemuan2.php
View/pertemuan2.php
Hasil