Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Barang extends CI_Controller{
- function __construct(){
- parent::__construct();
- $this->load->model('model_umroh');
- }
- function index(){
- $data['user'] = $this->model_umroh->tampil_data()->result();
- $this->load->view('lihat_data',$data);
- }
- function tambah(){
- $this->load->view('form_input');
- }
- function tambah_aksi(){
- $id_umroh = addslashes($this->input->post('id_umroh'));
- $nama_paket = addslashes($this->input->post('nama_paket'));
- $harga_paket = addslashes($this->input->post('harga_paket'));
- $pilih_paket = addslashes($this->input->post('pilih_paket'));
- $prog_hari = addslashes($this->input->post('prog_hari'));
- $akomodasi_hotel = addslashes($this->input->post('akomodasi_hotel'));
- $data = array(
- 'id_umroh' => $id_umroh,
- 'nama_paket' => $nama_paket,
- 'harga_paket' => $harga_paket,
- 'pilih_paket'=> $pilih_paket,
- 'prog_hari' => $prog_hari,
- 'akomodasi_hotel' => $akomodasi_hotel
- );
- $this->model_umroh->input_data($data,'tb_umroh');
- redirect('barang/index');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment