$f = '<input type="hidden" name="comment" value="'.$_GET[comment].'">
How can I make the output of this be
<input type="hidden" name="comment" value='data here'> instead of
<input type="hidden" name="comment" value="data here">
$f = '<input type="hidden" name="comment" value="'.$_GET[comment].'">' ;
You just forgot the final single quoteat the end of the line
Also use http://uk3.php.net/manual/he/function.htmlentities.php on the $_GET else ' will break your input.
eg.
<input type="hidden" name="comment" value='it's here'>
Using a GET instead of a POST also limits comment length due to url length limitations.
And since I'm pretty sure you don't mean to use the constant named comment, you should be using a string as your array index: $_GET['comment'].
Also don't forget that hidden fields shouldn't be trusted in terms of being out of the user's control; it's very easy to give a hidden field any value you desire.