How can PHP headers be used to redirect to a specific HTML page?
To redirect to a specific HTML page using PHP headers, you can use the "Location" header with the URL of the page you want to redirect to. This sends an HTTP header to the browser, instructing it to redirect to the specified page.
<?php
// Redirect to a specific HTML page
header("Location: https://www.example.com/newpage.html");
exit;
?>
Related questions
-
ORDER BY clause SQL queries PHP
-
HTTP headers troubleshooting PHP
-
PHP Undefined offset Error