I am getting the current (dynamic) page URL with:
$redirect = basename($_REQUEST['redirect']);
$redirect = base64_encode($redirect);
And that page URL might then be
www.domain.com/somepage?filter=1&category=1&limit=10
I then perform the action and want to redirect the person back to that dynamic page they were on with:
$redirect = base64_decode($redirect);
$output .= header_redirect($redirect);
But it's redirecting me to
www.domain.com/somepage?filter=1&category=1&limit=10
How can I fix that so that the &
becomes &
in the redirected URL?
The header_redirect
function is just:
function header_redirect ($redirect_url)
{
echo "<script>window.location.replace('" . $redirect_url . "');</script>";
}