当用户在codeigniter http:// localhost / abc / categories / subcategories / add_sub categories中提交表单时,我想调用一个函数

I have a categories controller and inside the categories controller i have two function one is displaying all the the sub categories and also display a form for adding a new sub category but a user click on add button it is not forwarding the url this location "http://localhost/abc/categories/sub_categories/" to "http://localhost/abc/categories/sub_categories/add_sub_categories" .

<?php 
      $attributes = array('method' => 'POST');
      echo form_open('categories/sub_categories/add_sub_category',$attributes);
 ?>