How to redirect to another page in PHP?
In this tutorial, We will learn How to redirect the user to another page in PHP. We can use the header() function to redirect the user to another page.
Syntax:
1 2 3 |
<?php header('location:url where you want to redirect'); ?> |
The following code redirects the user to the URL https://phpgurukul.com/php-projects-free-downloads/
1 2 3 |
<?php header('location:https://phpgurukul.com/php-projects-free-downloads/'); ?> |