How to play a code in php, style to a comment system.
Using this code, I was able to make this possible, but in the same way, the code returns only the last query item:
<?php
error_reporting(0);
header("Content-Type: text/html");
header("charset: UTF-8");
$comment_id = $_GET["postID"];
mysql_connect("localhost", "root", "usbw");
mysql_select_db("run");
$cmd = "SELECT * FROM 'comments' WHERE 'POST_ID' LIKE '$comment_id' LIMIT 0,10";
$cmd_q = mysql_query($cmd);
$xmlpath = "";
while($row = mysql_fetch_array($cmd_q)) {
$xmlpath = "<div id='comment.usr'>" . $row["POST_NAME"] . "</div> disse <div id='comment.content'>" . $row["POST_COMMENT"] . "</div>";
}
?>
<div id="comments">
<?php echo $xmlpath; ?>
</div>