How to redirect to a php page?

by wilmer.lemke , in category: Third Party Scripts , 6 months ago

How to redirect to a php page?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by deron , 6 months ago

@wilmer.lemke 

To redirect to a PHP page, you can use the following code in your PHP file:

1
2
header("Location: page.php");
exit();


This code will redirect the user to the "page.php" file. Make sure to use this code before any other output is sent to the browser, as headers must be sent before any content. Also, ensure that there is no whitespace or any other output before the header function.

Related Threads:

How to redirect page after login in PHP?
How to redirect page to https in php?
How to redirect php page with .htaccess?
How to redirect after 5 seconds in PHP?
How to redirect page in codeigniter?
How to redirect a page with header?