this is a very simple, not very secure way to do it. this is made considering you want it to save the comment in a database.
PHP Code:
<?php
if(isset($_POST['submit'])){
if(isset($_POST['comment'])){
$comment=$_POST['comment'];
$connect=mysql_connect($server, $username, $password);
if(!$connect)
echo "<p>failure at connecting to database server</p>";
if(!mysql_select_db($db, $connect))
echo "<p>failure at selecting db</p>";
mysql_query("INSERT INTO tbl_comments(comment_text) VALUES(".$comment.")");
echo "<p>Comment added to database.</p>";
}else{
echo "<p>No text was submitted.</p>";
}
}else{
?>
<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
<label for="comment">Give your comment</label><br />
<textarea name="comment" id="comment"></textarea><br />
<input type="Submit" name="submit" id="submit" value="submit" />
</form>
<?php }
?>
There is many examples in the internet about this though. it's a everyday task for a website.