devasatrio

edit_real_04

Apr 7th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. function e($kode){
  2.   $data_kode = array('id'=>$kode);
  3.   $data['data_buku']=$this->M_buku->cari_data($data_kode);
  4.   $this->load->view('edit',$data);
  5.  }
  6.  
  7. function edit(){
  8.   $judul = $this->input->post('judul');
  9.   $tebal = $this->input->post('tebal');
  10.   $penerbit = $this->input->post('penerbit');
  11.   $id = $this->input->post('id');
  12.   $data_kode = array('id'=>$id);
  13.  
  14.   $data_buku = array(
  15.        'judul'=>$judul,
  16.        'tebal'=>$tebal,
  17.        'penerbit'=>$penerbit
  18.        );
  19.  
  20.   $this->M_buku->edit_data($data_kode,$data_buku);
  21.   redirect('C_buku');
  22. }
Advertisement
Add Comment
Please, Sign In to add comment