The tabs/search bar/page entries appear at the top of the table as expected. But they are not sorted when clicked. It's like it only looks at the first row.
<script>
$(document).ready( function () {
$('#aeotable').DataTable();
} );
</script>
echo '
<table id="aeotable" class="display">
<thead>
<tr>
<th>Company Name</th>
<th>Expiry insurance certificate</th>
<th>Comments</th>
<th>File Name</th>
<th> </th>
</tr>
</thead>';
// Print each file
while($row = $result->fetch_assoc()) {
echo "
<tbody>
<tr>
<td>{$row['cop']}</td>
<td>{$row['expo']}</td>
<td>{$row['dec']}</td>
<td>{$row['fil']}</td>
<td><a download href=\"file/{$row['file']}\">Download</a></td>
</tr>
</tbody>";
}
// Close tabl
echo '</table>';