title: pass form data and a variable (ID) to a controller function codeigniter
body: <p>I want to pass a variable(id) along with form data to a controller function. the code is as folows</p>
  
  <pre><code>&lt;form action = "index.php/my_controller/my_function" method = "POST"&gt;
  
     &lt;input name = "comment" type = "text" size = "8"&gt;
     &lt;input type = "submit" value = "save"&gt;
  &lt;/form&gt;
  
    &lt;?php
       my_function($id){
                        // get the text
                        // get the id 
                        //save id and text
                       }  
    ?&gt;
  </code></pre>
  
  <p>when I try    </p>
  
  <pre><code>`action = "index.php/my_controller/my_function/&lt;?php echo record['ID']?&gt;"`
  </code></pre>
  
  <p>where $record['id'] gives me the id, the URL shows the id but HOW do i pass it to my_function($id) that is in the controller file. </p>