Hi AnthonySterling,
I have no idea what you have wrote here
but I pasted this (below) on my page. When I click next (thats the link) it takes me to: http://example.com/?s=100&kw=Garden/Center/Product/P2
I'm not sure if I'm adding this correctly. Also on my page are other '%s' symbols, I'm not sure if they interfer with each other. But I do notice ALL the links are going to: http://example.com/?s=100&kw=Garden/Center/Product/P2 ...except the "red" variables change.
PHP Code:
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']
);
}
Here is a look at a snipped of my code:
PHP Code:
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>\n";
}
echo "</div></center>";
}
}
Thanks
Bookmarks