problem with displaying grid data from mysql database
i am trying to use jquery-ui for the first time. i have done the server code but it is not displaying please can the code be review or look into
my php server code
- <?php
include("../db/dbconnect.inc");
$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
$offset = ($page-1)*$rows;
$result = array();
$rs = $mysqli->query("select count(*) from store_categories");
$row = $rs->fetch_row();
$result["total"] = $row[0];
$rsp = $mysqli->query("select * from store_categories limit $offset,$rows");
$cat = array();
while($rowp = $rsp->fetch_object()){
array_push($cat,$rowp);
}
$result["result"] = $cat;
echo json_encode($result);
?>
here is my html code
- <table id="tt" class="easyui-datagrid" style="width:1000px;height:250px;margin-left:auto;margin-right:auto" url="catdatagrid_getdata.php" title="Load Data" iconCls="icon-save" rownumbers="true" pagination="true">
<thead>
<tr>
<th field="ID" width="20px">ID</th>
<th field="cat_title" width="100px" sortable="true">Title</th>
<th field="cat_description" width="200px">Description</th>
</tr>
</thead>
it doesn't show any error and is not doing what it is suppose to do. please can i get help in solving the problem and making it work thanks