PHP Redirect loads current page
I am doing a redirect using the below code. The issue is that when the redirect code is executed, it loads the current page again and then eventually redirects to the new page.
I don’t want it to reload the current page and to redirect automatically to the new page.
Thanks
I have written code for the redirect and debugged the code.
function util_redirect ($page)
{
ob_start();
header("Location: " . $page,true);
ob_end_flush();
die();
}
Monic Thereon
You could use javascript to go to your URL with new tab.
echo ‘window.open(“your url”, “_blank”);’;