Documentation

/ Instructions

All you need to do is create a PHP file where you call the Creative Table and put it's output in a HTML content including the CSS style, the jQuery library and the class javascript file for normal or ajax submit method.

<?php

// MySQL settings and DB connection (if your project have already an open DB connection, you don't need to include this)
include_once('config.php');

// includes the function getCreativePagerLite()
include_once('functions.php');

// include the Creative Table class
include_once('creativeTable.php');

$ct=new CreativeTable();

// setup your table
$params = array(
    'sql_query'       => "SELECT * FROM imdbtop250",
    'search'          => $search,
    'multiple_search' => $multiple_search,
    'items_per_page'  => $items_per_page,
    'sort'            => $sort,
    'page'            => $page,
    'total_items'     => $total_items,
    'header'          => 'Rank,Rating,Title,Votes',
    'width'           => '25,40,,50'
);
$ct->table($params);

// pass a pager to the class
$ct->pager = getCreativePagerLite('ct',$page,$ct->total_items,$ct->items_per_page);

// display the table
$out_table = $ct->display();
?>

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/creative/style.css">
        <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="js/creative_table-1.3.min.js"></script>
        or
        <script type="text/javascript" src="js/creative_table_ajax-1.3.min.js"></script>
    </head>
    <body>
        <?php echo $out_table; // display Creative Table output ?>
    </body>
</html>