File: /var/www/content-sp/work-sp/user_session_history_data.php
<?php
include_once('config.php');
$sesid = $_REQUEST['sesid'];
$date = $_REQUEST['date'];
$sesQuery = "SELECT user_name, datetime, description from `csp_user_session_history` where session_id='$sesid' and date(datetime)='$date' order by datetime";
$sesData = $conn->query($sesQuery);
?>
<div class="panel panel-info">
<div class="panel-heading clearfix">
<h4 class="panel-title" style="width: 100%;">
<span style="width:90%; float:left;">
Session History
</span>
</h4>
</div>
<div class="panel-body" style="padding:0;">
<div class="table-responsive">
<table id="online_txn" class="display table" style="width: 100%;">
<thead>
<tr>
<th>S.No</th>
<th>Name</th>
<th>Description</th>
<th>Datetime</th>
</tr>
<?php
$i = 1;
while ($sdt = $sesData->fetch_assoc()) {
//foreach ($sesData as $sdt) {
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $sdt['user_name']; ?></td>
<td><?php echo $sdt['description']; ?></td>
<td><?php echo $sdt['datetime']; ?></td>
</tr>
<?php $i++;
} ?>
</thead>
</table>
</div>
</div>
</div>