public function comments_submit() { $user_id = $this->input->post('user_id'); $story_id = $this->input->post('story_id'); $textarea = filterCommentBeforeSave($this->input->post('textarea')); $date = date('Y-m-d h:i'); $data_insert = array('comments' => $textarea, 'user_id' => $user_id, 'section_type' => '2', 'section_type_id' => $story_id, 'is_approved' => '1', 'is_enable' => '1', 'created_date' => $date); $this->db->insert('comments', $data_insert); $msg = comments_data($story_id, '0', 'pop'); // $msg="Thanks for successfully submitting your comment"; echo $msg; }
<div class="text-center"> <a class="button see-more-story btn-color" href="javascript:;" id="<?php echo $val['id'] . '_' . $val['url_slug']; ?> ">Read More</a> </div> <?php } ?> </div> <div class="stories-content-bottom common-new"> <div class="stories-bottom-comment common-new" id='comment_data_main'> <!-- COMMENT SECTION START --> <?php echo comments_data($val['id'], 1, ''); ?> <!-- COMMENT SECTION END --> </div> <div class="common-new comment-textarea"> <span id="comment_msg_<?php echo $val['id']; ?> "></span> <textarea class="form-control from-comment mention" placeholder="Add a comment....." onfocus="this.placeholder = ''" onblur="this.placeholder = 'Add a comment.....'" id="commentsubmit_<?php echo $val['id']; ?> " ></textarea> <a href="javascript:;" class="enter-text"><i class="fa fa-level-down"></i></a>
?> " /> </div> </div> <div class="stories-content-mid common-new"><?php echo $res['description']; ?> </div> <div class="stories-content-bottom common-new" id="comment-target"> <?php echo comments_data($res['id'], '0', 'pop'); ?> <div class="bottom-comment-section common-new"> <div class="common-new comment-textarea"> <span id="comment_msg_pop"></span> <textarea class="form-control mention" placeholder="Add a comment....." id="form-comment"></textarea> <a href="javascript:;" class="enter-text mcomment"><i class="fa fa-level-down"></i></a> </div> </div> </div>
<?php echo comments_data('131', '0', 'pop');