This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Commentics in the (php) loop?

I added Commentics to my website and thanks to documentation guides each page has it's own separate comment box. But I have a problem with one page - list of articles. This page is loaded dynamically with the while loop. My code:

$q = "SELECT * FROM articles ORDER BY id DESC";
$result = mysqli_query($dbc_connection, $q);

while($list = mysqli_fetch_array($result)){ ?>

<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h2><?php echo $list['title'] ?><br /></h2>
<p> <?php echo $list['header'] ?><p>
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne<?php echo $list['id'] ?>">Read</a>
<div id="collapseOne<?php echo $list['id'] ?>" class="panel-collapse collapse out">
<div class="panel-body">
<p><?php echo $list['body'] ?></p>

Hi buidiena3,

Commentics works properly when there is only one instance of it per page.

So I don't think it would be suitable for a while loop such as the one in your post.

Have you completed the interview?

Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by kbadmin
28-May-2019, 07:16 PM
Last Post by bobby
10-Oct-2015, 10:11 PM
Last Post by finzer
30-Apr-2015, 09:12 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)