Passing variables to controller with URL
Permalink
On my dashboard single page, I want to pass 2 variables to the remove function in the controller. In the view I have this:
And in the controller I have the remove function:
Both variables are 'undefined'. But when I only pass 1 variable, this is the view:
and this is the function in the controller:
and it works fine. Why can't I pass 2 variables to the remove function?
echo '<a class="btn btn-primary btn-sm" href="'.View::url('dashboard/emp_apps/department_view/remove/'.$dpt['dptID'].'/'.$dpt['bID']).'">'.t('Remove').'</a>';
And in the controller I have the remove function:
Both variables are 'undefined'. But when I only pass 1 variable, this is the view:
echo '<a class="btn btn-primary btn-sm" href="'.View::url('dashboard/emp_apps/department_view/remove/'.$dpt['dptID'].'">'.t('Remove').'</a>';
and this is the function in the controller:
public function remove($dptid = NULL) { echo '<script>alert("dptID=".$dptID);</script>'; }
and it works fine. Why can't I pass 2 variables to the remove function?
I think it will work.