Writing it yourself is pretty simple.
Just make a page with the form that the user will write what they want for their comment:
HTML Code:
<form action="postReview.php" method="post">
<textarea cols="20" rows="5" name="comment"></textarea><br />
<input type="text" name="poster" size="12" /><br />
<input type="submit" value="Post comment." />
</form>
And make a page to add it to the database:
PHP Code:
<?php
# Define values host,dbname,username and password as $s before the try{} statement
try {
$dbh = new PDO("mysql:host=$host;dbname=$dbname", $username,$password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
print ("Could not connect to server.\n");
}
# Comments page
# Get the info and organize it in an array
$info = array(
"com"=>$_POST['comment'],
"name"=>$_POST['poster']);
# Create an array in case of errors
$errors = array();
# Check each entry
if(empty($info['com']))
$errors[]="Invalid comment.";
if(empty($info['name']))
$errors[]="Invalid username.";
# If there were errors tell them what went wrong and post a link to go back to the form page
if($errors) {
echo "There were errors with your post: ";
echo "<ul><li>";
echo implode("</li><li>",$errors);
echo "</li></ul>";
echo "<a href='formPage'>Go back</a>";
exit;
}
# SQL query that will insert data into database
$sth = $dbh->prepare("INSERT INTO comments(id,comment,poster,date) VALUES(0,?,?,now())");
$sth->execute(array($info['com'],$info['name']));
echo "Comment posted.";
?>
And in your database (assuming you use the PHPMyAdmin) create the table and each column value (or just import this code (save as .sql file and click the Import tab))
Code:
CREATE TABLE comments(id int(255) PRIMARY KEY auto_increment, comment text, poster varchar(30), date varchar(100))
And there you have it. Place the HTML on whichever page the customer wants it, and create a page (which I called 'postReview.php') for the PHP->mysql. But import the sql in first or the whole thing will not work.
Hope this helps.