这是我的代码:
$blogid = mysql_real_escape_string($_GET['id']);
if((isset($_POST['comment']))&&(!(trim($_POST['comment'])==FALSE))&&(isset($_SESSION['userid']))){
$comment = mysql_real_escape_string($_POST['comment']);
$querycomment = "INSERT INTO `comment` (`userid`, `blogid`, `body`) VALUES ( '".$_SESSION['userid']."', '".$blogid."', '".$comment."');";
$rowchat = mysql_query($querymess,$db_con) or die("Failed: " . mysql_error() );
}
<form method="post" action="blog.php?id=<?php echo $blogid; ?>" >
<textarea name="comment" ></textarea>
<input type="submit" value="send" name="submit" />
</form>
当用户对此发表评论时:
This
is
my
world
然后在评论列表中出现这个:
This is my world
为什么换行不起作用?