Insert some data in comment upon comment submit
Since you didn't say which version of Drupal are you using, I'll assume that you're talking about D7.

You need to use hook_comment_presave().

function YOUR_MODULE_comment_presave($comment) {
  // Do this only for new comments.
  if (!$comment-&gt;cid) {
    // This code will insert the subject as heading.
    $subject = '&lt;h2&gt;' . $comment-&gt;subject . '&lt;/h2&gt;';
    $comment_text = $comment-&gt;comment_body[LANGUAGE_NONE][0]['value'];
    // Set the value.
    $comment-&gt;comment_body[LANGUAGE_NONE][0]['value'] = $subject . $comment_text;
  }
}


However, do bear in mind that you will need to handle somehow editing existing comments as well.

Hope this helps.