IT is working if i give after this line $bp =& $this->pageByPage($manager->limit, $qry);
echo $bp->nav;
pagination function in the following code if i give print_r($bp); then only it is working. see the image below. please tell me how to solve the problem
<table style="background-color: solid #8592A2" ><tr><td><table align="center" style="margin-top:20px; padding: 20px 0px; border: 0px; ">
<tr><td>
<?php
class MemberView_form extends AppView
{
var $tmpl = 'displist.php';
function execute(&$obj, &$manager) {
$qry="select * from s_kb_article_client";
$result=mysql_query($qry);
$res=mysql_query($qry);
$row=mysql_fetch_row($res);
$title=$row['title'];
$body=$row['body'];
$meta_description=$row['meta_description'];
$date_updated=$row['date_updated'];
$bp =& $this->pageByPage($manager->limit, $qry);
echo $bp->nav;
print_r($bp);?>
<?php
$today = $row['date_updated'];
$nextyeardt = date("d");
$nextyearmt = date("m");
$nextyearyr = date("Y");
$todate = $nextyearmt . "-" .$nextyeardt."-". $nextyearyr;
$categories =&$this->stripVars($manager->getRecordscategory_tble2($bp->limit, $bp->offset));
?>
<?php
echo '<table border="0" width="90%" cellpadding="4" cellspacing="1" class="tdBorder" align="center"><tr class="tdTitle"><td width="10"></td><td width="94">Title</td><td width="73">Query</td><td width="100">Posted Date</td><td width="69">Username</td><td width="167">Answer</td><td width="20">View</td><td width="20">Edit</td><td width="20">Delete</td></tr>';
echo '<tr>';
foreach($categories as $row) {
$id=$row['id'];
$title=$row['title'];
$body=$row['body'];
$meta_description=$row['meta_description'];
$date_updated=$row['date_updated'];
$user=$row['username'];
$answer=$row['answer'];
$qry2="select email from s_member where username='".$user."'";
$res2=mysql_query($qry2);
while($row2=mysql_fetch_array($res2))
{
$email=$row2['0'];
echo "<td><img src='images/icons/lock2_red.gif' width='10' height='10' alt='' ><div id='div1' style='display: none'></div></td ><td>".$body."</td><td>".ucfirst(substr(ltrim($meta_description),0,40))."</td><td>".$todate."</td><td><a href=mailto:".$email.">".$user."</a></td><td>".ucfirst(substr(ltrim($answer),0,80))."<br /></td>";
?>
<td><b><a href="viewqueries.php?action=view&id=<?php echo $row['id']; ?>">View</a></b></td>
<td><b><a href="testpage.php?action=select&id=<?php echo $row["id"]; ?>"><img src="images/icons/update.gif" border="0"></a></b></td>
<td><b><a onClick="return window.confirm('Are you sure you want to delete record?')" href="index.php?module=scripts1&method=delete&id=<?php echo $row["id"]; ?>"><img src="images/icons/delete.gif" border="0" ></a></b></td>
</tr><?php
}
}
echo "</table>"; ?></td></td></table></td></tr></table><?php
}
}
if(isset($_GET['method'])) {
$qry="delete from s_kb_article_client where id=".$_REQUEST['id'];
$res=mysql_query($qry);
print "<script>";
print "window.location.href='index.php?module=scripts1'";
print "</script>";
}
?>