![]() |
how can i get the particular post id in foreach loop - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: how can i get the particular post id in foreach loop (/showthread.php?tid=62173) Pages:
1
2
|
RE: how can i get the particular post id in foreach loop - Chandini - 08-10-2015 (06-25-2015, 02:39 AM)Chandini Wrote:(06-24-2015, 07:37 AM)Wouter60 Wrote: In a very compact form, your view should have this structure:Wow Thanks .. Its working ... really thanks to Wouter60 RE: how can i get the particular post id in foreach loop - Wouter60 - 08-10-2015 Quote:Is there any chance to submit the comment in ajaxSure, in order to do that, first alter this line: PHP Code: echo form_input('post_comment[]',NULL,'size="40" class="ta-comment"'); PHP Code: echo form_input('post_comment[]',NULL,'size="40" class="ta-comment" postid="' . $row->post_id . '"'); Then, in the script section, make the following changes: Code: <script> And finally, you need to add a new method to your controller Regcheck, to make it insert the posted comment: PHP Code: public function ajax_comment_insert() |