I want to get all the related pics corresponding to the pic selected....
here is my view page

<?php foreach($detail as $row){?>                                       
<img class="primary-image" ima="<?php echo base_url();?>images/<?php echo $row->image;?>" src="<?php echo base_url();?>images/<?php echo $row->image;?>" alt="" />                                          
<?php }?>

my control page looks like this....

public function product_details($p_id)
    $id = $this->input->post['category_id'];

my model page looks like this

public function get_related_image($id,$limit,$offset)
    $query = $this->db->get();
    return $query->result();


here is my table-gallery(table name)

id     image                category_id         
93   img1455604030.jpg       10              
94   img1455605183.jpg       11               
95   img1455616291.jpg       11                
96   img1455617201.jpg       10                
97   img1455617299.jpg       10                
98   img1455681918.jpg       13              
99   img1455681957.jpg       12  

this is my code to view image by clicking

<a href="<?php echo base_url();?>roxcontrol/product_details/<?php echo $row->id; ?>/<?php echo $row->category_id; ?>">

my table contains shirts,tshirts,pants images and their corresponding category_ids are 10,11,12 when i choose the category_id=10 shirt image i want to get all category_id=10 shirt images under the related products and like that

the problem is category_id value is null iam not getting category_id value