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?
#1

Hi,
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>
<div id="collapseOne<?php echo $list['id'] ?>" class="panel-collapse collapse out">
<div class="panel-body">
<p><?php echo $list['body'] ?></p>
<p>

</p>
</div>
</div>
</div>
</div>

<?php
}
As you can see there's an empty <p> </p> where I would like to paste comment box so each article has it's own. I've read that it's impossible to have more than one per page but I wonder if there's a way to somehow get around this. For example using one of the variables (id, title...) as identifier. But so far nothing seems to work.
Can this be done?
Thanks!
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
19-Feb-2020, 10:26 AM
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)