add comment form in views
&lt;?php
$comment = new stdClass;
$comment-&gt;nid = $row-&gt;nid;
$form = drupal_get_form('comment_form', $comment);
print render($form);
?&gt;

Works for me. Make sure that your Content: Nid field is ABOVE the Global: PHP field, otherwise (when it's below it) $row-&gt;nid is not available as a variable.

Update
After reading your Q more carefully, since you want it in the footer then you need to specify the node id of the form. (Under what node this comment will be stored) For Example: /node/1
&lt;?php
$comment = new stdClass;
$comment-&gt;nid = 1;
$form = drupal_get_form('comment_form', $comment);
print render($form);
?&gt;

If you want /node/5 you change this line to $comment-&gt;nid = 5;
OR
If you want this to be dynamic, the nid to be based on the page you're viewing. Then use
&lt;?php
if ($node = menu_get_object()) {
$comment = new stdClass;
$comment-&gt;nid = $node-&gt;nid;
$form = drupal_get_form('comment_form', $comment);
print render($form);
}
?&gt;

Note: The form will not render/show on views preview, but it will show up when you visit the node.