Error Warning - Datatable cannot be reinitiated - upon include php statement
Error Warning - Datatable cannot be reinitiated - upon include php statement
I replaced the codes of 'php mysql connection' from index.php with <?php include 'xyz.php';?> .
And put those codes into xyz.php. This works but the warning pops up. "table id=example. Cannot reinitialize DataTables.
It works fine if I reinsert the codes and avoid the include statement. (This is datatable with paging, search options.)
https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css
https://cdn.datatables.net/buttons/1.2.2/css/buttons.bootstrap.min.css
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js
https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js
https://cdn.datatables.net/buttons/1.2.2/js/dataTables.buttons.min.js
https://cdn.datatables.net/buttons/1.2.2/js/buttons.colVis.min.js
https://cdn.datatables.net/buttons/1.2.2/js/buttons.html5.min.js
https://cdn.datatables.net/buttons/1.2.2/js/buttons.print.min.js
https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js
https://1cdn.datatables.net/buttons/1.2.2/js/buttons.bootstrap.min.js