emprit

user_controller

Sep 25th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. public function update() {
  2.         if($this->input->server('REQUEST_METHOD')== 'POST'){
  3.         $id_user = $this->input->post('id_user');  
  4.         $nama = $this->input->post('nama');
  5.         $nama_lengkap = $this->input->post('nama_lengkap');
  6.         $email = $this->input->post('email');  
  7.         $ubah = $this->user_model->ubah_mahasiswa($id_user, $nama, $nama_lengkap, $email); 
  8.             if($ubah == FALSE){
  9.                 $array = array(
  10.                             'title' => 'Daftar User',  
  11.                             'content' => $this->load->view('template_admin/error','',true),
  12.                             'footer' => $this->load->view('template_admin/footer','',true));
  13.                 $this->load->view('template_admin/home', $array);      
  14.             }else{
  15.                 $array = array(
  16.                             'title' => 'Daftar User',  
  17.                             'content' => $this->load->view('template_admin/sukses',$ubah,true),
  18.                             'footer' => $this->load->view('template_admin/footer','',true));
  19.                 $this->load->view('template_admin/home', $array);      
  20.             }      
  21.         }else {
  22.         printf('direct access is not allowed');    
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment