$addreply_name = $_POST['addreply_name_edit']; $addreply_body = $_POST['addreply_body_edit']; if (isset($_SESSION['userlogin'])) { $addreply_writer = $_SESSION['username']; } else { $addreply_writer = $_POST['addreply_writer_edit']; } $date = date('Y-m-d H:i:s'); $comments_type = "comments_{$post_type}"; // $sql= insert($comments_type,array(array("name","body","post_id","writer","date"),array($addreply_name,$addreply_body,$post_id,$addreply_writer,$date))); $comment['name'] = $addreply_name; $comment['body'] = $addreply_body; $comment['writer'] = $addreply_writer; $comment['date'] = $date; $comment['post_id'] = $post_id; $posts->add_post($comments_type, $comment); } } // END Comments ?> <div class="post"> <div class="post_info"> <div class="post_title"> <h2><?php echo $post_name; ?> </h2> </div>