I’m using php pagination in my webpage but after go to 2nd page with help of pagination php rid the variable which I REQUEST from the last page, and getting the error like,
Undefined index: title_no in E:\…\page_name.php on line 7
but when I’m using static variable then its working fine, but in dynamic it’s rid the variable after go to 2nd page, This is some code of pagination where I’m getting problem
ob_start();
@session_start();
include("connect.php");
$title_no=@$_REQUEST['title_no'];
$tbl_name="postadd";
$adjacents = 2;
$productQuery = " where visible='1' AND title_no='{$_REQUEST['title_no']}'";
$query = "SELECT COUNT(*) as num FROM $tbl_name $productQuery";
$total_pages_row = mysql_query($query);
$total_pages_num = mysql_fetch_assoc($total_pages_row);
$total_pages = $total_pages_num['num'];
$targetpage = "product_listing_working.php";
$limit_val = @$_GET['pagesize'];
if($limit_val!='') {
$limit = $limit_val;
} else {
$limit = 3;
}
$page = @$_GET['page'];
if($page)
$start = ($page - 1) * $limit;
else
$start = 0;
$sql = "SELECT * FROM $tbl_name $productQuery LIMIT $start, $limit";
$result = mysql_query($sql);
Please guide me where I’m going wrong
Thanks in advance