I got these variables
$sql_select_reply = "SELECT reply_content
FROM replies
WHERE topic_name = '" .htmlspecialchars($_GET["TopicTitle"])." ' ";
$query_select = mysqli_query($link, $sql_select_reply);
$query_num_rows_replies = mysqli_num_rows($query_select);
$query_print_reply = mysqli_query($link, $sql_select_reply) ;
And I want to make a loop which prints every row from the DB.
This is what I tried, but didn't work.
while($row_reply = mysqli_fetch_assoc($query_print_reply)) {
$sql_print_reply = "SELECT reply_content
FROM replies
WHERE topic_name = '" .htmlspecialchars($_GET["TopicTitle"])." ' ";
$query_print_reply = mysqli_query($link, $sql_print_reply) ;
echo $row_reply['reply_content'];
echo "<br>";
break;
}
Thanks in advance.