title: How to get value from table grid in Codeigniter
body: <p>I have simple custom grid developed in Codeigniter, i have following columns in grid</p>
  
  <p>Sl - CheckValue(Checkbox) - Userid - Username - Email</p>
  
  <p>so, if anyone check any row and submit, i should able to get values of selected row..</p>
  
  <p>so can any one give me idea how can i do same in codeigniter..</p>
  
  <pre><code>              function showattendee($id, $offset=0)
  {
      $person = $this-&gt;Person_model-&gt;get_by_id($id)-&gt;row();
      $this-&gt;form_data-&gt;id = $person-&gt;tab_classid;
      $this-&gt;form_data-&gt;classtitle = $person-&gt;tab_classtitle;
      $this-&gt;form_data-&gt;classdate = $person-&gt;tab_classtime;
      $this-&gt;form_data-&gt;createddate = $person-&gt;tab_crtdate;
      $this-&gt;form_data-&gt;peremail = $person-&gt;tab_pemail;
      $this-&gt;form_data-&gt;duration = $person-&gt;tab_classduration;
  
      //Show User Grid - Attendee&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
      $uri_segment = 0;
      $offset = $this-&gt;uri-&gt;segment($uri_segment);
      $courses = $this-&gt;Mycourses-&gt;my_courses($this-&gt;limit,$offset,$this-                 &gt;form_data-&gt;classtitle)-&gt;result();
      // generate pagination
      $this-&gt;load-&gt;library('pagination');
      $config['base_url'] = site_url('person/index/');
      $config['total_rows'] = $this-&gt;Mycourses-&gt;count_all();
      $config['per_page'] = $this-&gt;limit;
      $config['uri_segment'] = $uri_segment;
      $this-&gt;pagination-&gt;initialize($config);
      $data['pagination'] = $this-&gt;pagination-&gt;create_links();
      // generate table data
      $this-&gt;load-&gt;library('table');
      $this-&gt;table-&gt;set_empty("&amp;nbsp;");
      $this-&gt;table-&gt;set_heading('Ref#','Check', 'User Id','User Name', 'Email');
      $i = 0 + $offset;
      foreach ($courses as $course)
      {
          $checkarray=array('name'=&gt;'chkclsid[]','id'=&gt;'chkclsid','value'=&gt;$course-&gt;user_id);
          $this-&gt;table-&gt;add_row($course-&gt;mycourse_id,form_checkbox($checkarray), $course-&gt;user_id, $course-&gt;user_name, $course-&gt;user_email);
      }
      $data['table'] = $this-&gt;table-&gt;generate();
  </code></pre>
  
  <p>//end grid code</p>
  
  <pre><code>    // load view
      // set common properties
      $data['title'] = 'Assign Attendees';
      $msg = '';
      $data['message'] = $msg;
      $data['action'] = site_url('person/CreateAttendees');
      //$data['value'] = "sssssssssssssssssss";
      $session_data = $this-&gt;session-&gt;userdata('logged_in');
      $data['username'] = "&lt;p&gt;Welcome:"." ".$session_data['username']. " | " . anchor('home/logout', 'Logout')." | ". "Userid :"." ".$session_data['id']; "&lt;/p&gt;";
      $data['link_back'] = anchor('person/index/','Back to list of Classes',array('class'=&gt;'back'));
      $this-&gt;load-&gt;view('common/header',$data);
      $this-&gt;load-&gt;view('adminmenu');
      $this-&gt;load-&gt;view('addattendee_v', $data);
  
  }
  </code></pre>