Hi, i'm trying to do a simple redirect problem but i've run into a problem, here's the function:
function redirect($path, $timeout = 2) {
header('Refresh: ' . $timeout . '; URL=' . str_replace('&', '&', $path));
}
My problem is when the path passed in contains & ie (index.php?s=1&c=2) it cuts off everything after the semi colon. I tried doing a str_replace on the path replacing & with & but i found that this doesn't always works when you go to a path with & instead of &.
function redirect($path, $timeout = 2) {
header('Refresh: ' . $timeout . '; URL=' . str_replace('&', '&', $path));
}
My problem is when the path passed in contains & ie (index.php?s=1&c=2) it cuts off everything after the semi colon. I tried doing a str_replace on the path replacing & with & but i found that this doesn't always works when you go to a path with & instead of &.