-
Notifications
You must be signed in to change notification settings - Fork 0
/
view_responses.php
33 lines (33 loc) · 1.15 KB
/
view_responses.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
<h3>Responses of Form <?php echo $_GET['code'] ?></h3>
<hr class="border-primary">
<div class="col-md-12">
<table id="forms-tbl" class="table table-stripped">
<thead>
<tr>
<th>#</th>
<th>DateTime</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$forms = $db->conn->query("SELECT * FROM `response_list` where form_code = '".$_GET['code']."' order by date(date_created)");
while($row = $forms->fetch_assoc()):
?>
<tr>
<td class="text-center"><?php echo $i++ ?></td>
<td><?php echo date("M d,Y h:i A",strtotime($row['date_created'])) ?></td>
<td class='text-center'>
<a href="./index.php?p=view_response&code=<?php echo $row['form_code'] ?>&id=<?php echo $row['id'] ?>" class="btn btn-default border">View</a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
<script>
$(function(){
$('#forms-tbl').dataTable();
})
</script>