/ Published in: PHP
Credit: FinalWebsites.com
The only argument is a comma separated list of querystring vars that you don't want to carry over. At minimum you should pass the name of the var that you're appending the existing querystring(s) to so it's not included twice in the URL.
The only argument is a comma separated list of querystring vars that you don't want to carry over. At minimum you should pass the name of the var that you're appending the existing querystring(s) to so it's not included twice in the URL.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// // Example: echo '<a href="?page='. $previousPage . rebuildQueryString("page,submit") .'">Prev</a>'; // This would carry over any querystrings from the current URL, minus the current // $_GET['page'] and $_GET['submit'] keys and values if they exist // function rebuildQueryString($curr_vars='') { { foreach ($parts as $val) { { } } { } else { return false; } return $qs; } else { return false; } }
URL: http://www.finalwebsites.com/snippets.php?id=6