I get errors: Notice: Undefined index: p, page, srt and where
// set default pagenation values
if(!$_GET['p']) $_GET['p'] = $conf['perpage']; // default number of entries per page
if(!$_GET['page']) $_GET['page'] = 1; // current page
if(!$_GET['srt']) $_GET['srt'] = $conf['srt']; // default sort order
$start = ($_GET['page'] - 1) * $_GET['p']; // start row for query
// get total number of entries for pagenation
$result = mysql_query("SELECT COUNT(*) FROM articals $where", $link);
$total = mysql_fetch_array($result); $total = $total[0]; // total number of listings
$pages = ceil($total / $_GET['p']); // number of pages
And also on: Notice: Undefined index: category, description,model,cond,location,photos,featured and where
$_GET = safe_data($_GET, 'query');
if($_GET['category']) $where .= "AND (category='$_GET[category]' OR category2='$_GET[category]') ";
if($_GET['description']) $where .= "AND description LIKE '%$_GET[description]%' ";
if($_GET['model']) $where .= "AND model LIKE '%$_GET[model]%' ";
if($_GET['cond']) $where .= "AND cond='$_GET[cond]' ";
if($_GET['location']) $where .= "AND location='$_GET[location]' ";
if($_GET['photos']) $where .= "AND images>'0' ";
if($_GET['featured']) $where .= "AND featured='1' ";
// finialize query string if necessary
if(substr($where, 0, 3) == 'AND') {
$where = ltrim($where, 'AND');
$where = 'WHERE'.$where;
}
// do not show hidden and expired listings
$display = "hide!='1' AND (expire>'".time()."' OR expire='' OR expire='0') AND (user_expire>'".time()."' OR user_expire='' OR user_expire='0')";
$display = "hide!='1'";
if(!$where) $where = "WHERE ".$display;
else $where .= "AND ".$display;
Any Help please?