-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcomment.php
33 lines (28 loc) · 1.08 KB
/
comment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
//$m =new MongoDB\Client("mongodb://vinay0410:[email protected]:23725/pizza");
$m =new MongoDB\Client("mongodb://vinay0410:[email protected]:23725/pizza");
$db = $m->pizza;
$collection = $db->feedback;
$cursor = $collection->find()->toArray();
?>
<h2 class="text-uppercase text-center">feedback</h2>
<div class="comments-container">
<ul id="comments-list" class="comments-list">
<?php foreach (array_reverse($cursor) as $document) { ?>
<li>
<div class="comment-main-level">
<div class="comment-avatar"><img src="https://cdn.vectorstock.com/i/thumb-large/48/33/human-man-user-profile-avatar-glyph-icon-vector-10704833.jpg" alt=""></div>
<div class="comment-box">
<div class="comment-head">
<h6 class="comment-name by-author"><a href="#"><?php echo ucwords($document["name"]); ?></a></h6>
</div>
<div class="comment-content">
<strong><?php echo $document["subject"] . "\n"; ?></strong><br/>
<?php echo $document["message"] . "\n"; ?>
</div>
</div>
</div>
</li>
<?php } ?>
</ul>
</div>