if ($current_page != $pages) {
$finals = ($pages - 1) * $limit;
$url = "$your_search_page?s=$finals&kw=$append";
if ($sort_enabled == TRUE && isset($_GET['o'])) {
$url .= "&o=$o";
}
echo "<a href=\\"$url\\">$last_text</a>";
}
}
// check to see if last page
if (!((($s+$limit)/$limit)==$pages)) {
// not last page so give NEXT link
// new s value = s + number of rows per page
function funkify_url($url){
list($host, $qs) = explode('?', $url);
parse_str($qs, $params);
return sprintf(
'http://%s/%s/P%s.html',
parse_url($host, PHP_URL_HOST),
$params['kw'],
$params['s']
);
}
$news=$s+$limit;
$next_url = "$your_search_page?s=$news&kw=$append";
if ($sort_enabled == TRUE && isset($_GET['o'])) {
$next_url .= "&o=$o";
}
echo " | <a href=\\"$next_url\\">$next_text</a>\
";
}
echo "</div></center>";
}
}
I’m still working on these paging URLs! I finally figured out how to connect the function to the variable. That was a big help:) I like this little function. The only trouble I’m having is the way I have it set up (below) it creates a URL like this: http://example.com/-P10.html
It dosen’t add the $news variable to the URL. I’ve worked with it very much and can’t see anything wrong. Does it appear to you that I have it set up correct? I changed the slashes to dashes, they look better to me.