我想为每个帖子创建评论而不刷新页面。
PHP代码:
leads(user_id, created_at)
我遇到了PHP循环中出现的表单问题。 JS代码只适用于第一篇文章的第一篇表格。
foreach ($result as $articles){?>
<p><?echo $articles['title'];?></p>
<p><?echo $articles['content'];?></p>
foreach ($comm as $comment){?>
<div class = "comment_show">
<p><? echo $comment['user'];?></p>
<p><? echo $comment['comm_text'];?></p>
</div>
<form class = "comment_form" action = "send.php" action ="POST">
<input type ="hidden" name ="article_id" value ="<? echo $articles['id']" class = "content_id"
<input type ="text" name ="username" class = "userlogin">
<textarea name ="comment" class = "comm_cont">
<input type ="button" name ="submit" class = "submit">
</form>
<?php
}
}
?>
我在哪里 弄错了吗?