open('comments.db'); } } if (isset($_POST['user'], $_POST['comment'])) { $user = $_POST['user']; $comment = $_POST['comment']; $db = new MyDB(); $sql = 'INSERT INTO Comments VALUES(\'' . $user . '\',\'' . $comment . '\')'; $ret = $db->exec($sql); $db->close(); } echo '
' . $row['user'] . ' says:
' . htmlspecialchars($row['comment'], ENT_QUOTES, 'UTF-8'). '