I'm trying to set up a comments box on the members section of my website.PHP Code:<?php
mysql_connect("localhost", "****", "****") or die('could not connect to database');
mysql_select_db("****") or die('Could not select database');
if (isset ($_POST['submit']))
{
$comment = mysql_escape_string (trim ($_POST['comment']));
$sql = mysql_query ("INSERT INTO comments (id,comments) VALUES ('0','".$comment."')");
echo 'Your comment has been entered successfully!';
}
else
{
// POST data wasnt entered, so display the comments and comment form
// view comments from database
$sql = mysql_query ("SELECT * FROM comments");
while ($row = mysql_fetch_array ($sql)) {
echo $row['comments'].'<br />';
}
echo '<br /><br />
<form action="comments.php" method="post">
Comments:<br />
<textarea name="comment" cols="40" rows="7"></textarea>
</form>';
?>
2 things-
1- is mysql_escape_string good enough secourity to prevent sql attacks.
2- when i run the script this error comes up
Parse error: syntax error, unexpected T_STRING in /home1/keyboard/public_html/Canberra Amatuer Productions/comments.php on line 6
Any help would be appreciated

