Advertisement
eyoku_

Untitled

Jun 16th, 2020
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public function update($idUser) {
  2. $user = $this->UserModel->getByPrimaryKey($idUser);
  3. $data = array(
  4. "header" => "User",
  5. "page" => "content/user/v_update_user",
  6. "user" => $user
  7. );
  8. $this->load->view("layout/main", $data);
  9. }
  10. public function proses_update() {
  11. $id = $this->input->post("id");
  12. $user = array(
  13. "nama_user" => $this->input->post("nama"),
  14. "email_user" => $this->input->post("email"),
  15. "role_user" => $this->input->post("role"),
  16. );
  17. $this->UserModel->update($id, $user);
  18. redirect("user");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement