application/controllers/User.php
// method untuk edit user berdasarkan id
method untuk edit user berdasarkan id
method untuk edit user berdasarkan id
public function edit(){
		$username = $_POST['username'];
		$fullname = $_POST['fullname'];
		$password = $_POST['password'];
		$role = $_POST['role'];
		$old_username = $_POST['old_username'];
		$this->user_model->editUser($username, $fullname, $password, $role, $old_username);
		redirect('dashboard/user');
	}
public function edit ( ) { $ username = $ _POST [ 'username' ] ; $ fullname = $ _POST [ 'fullname' ] ; $ password = $ _POST [ 'password' ] ; $ role = $ _POST [ 'role' ] ; $ old_username = $ _POST [ 'old_username' ] ; $ this -> user_model -> editUser ( $ username , $ fullname , $ password , $ role , $ old_username ) ; redirect ( 'dashboard/user' ) ; }
method untuk edit user berdasarkan id
method untuk edit user berdasarkan id
// panggil method insertUser() di model 'user_model' untuk menjalankan query insert