Problem using datatables

Problem using datatables

ninja_yanninja_yan Posts: 9Questions: 0Answers: 0
edited August 2012 in DataTables 1.9
Hi everyone!
I'm having problem using datatables jquery plugin. I watch/read different tutorials to solve my problem and I ended up here. I can't use datatables plugin. Here's my code.

index.php
------------
<?php
include("connection.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



jQuery dataTable




$(document).ready(function(){
$('#datatables').dataTable();
});







Full Name
Office/Department
Email
Username
Privilege
Register Date



<?php include("get_accounts.php"); ?>




-----------
here's the get_accounts.php
-------------------
<?php
$get_user = $connection->query("SELECT CONCAT(last_name,', ', first_name,' ', middle_initial,'.') as name, username, office, email, status, privilege, registered_datetime
FROM users
WHERE status = '".mysql_real_escape_string("Active")."' ORDER BY last_name ASC");
while($row = $get_user->fetch_assoc())
{
?>

<?php echo $row['name']; ?>
<?php echo $row['office']; ?>
<?php echo $row['email']; ?>
<?php echo $row['username']; ?>
<?php echo $row['privilege']; ?>
<?php echo $row['privilege']; ?>

<?php
$reg_datetime = $row['registered_datetime'];
$reg_convert = strtotime($reg_datetime);
echo date("M d, Y - g:i A", $reg_convert);
?>


<?php
}
mysqli_free_result($get_user); //free result
mysqli_close($connection); //close the connection to the database
?>
------------------
Anyone can give a hand? Thanks!
This discussion has been closed.