How to redirect to another page in PHP?
by
Anuj Kumar
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:
|
<?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/
|
<?php header('location:https://phpgurukul.com/php-projects-free-downloads/'); ?> |
Tags: How to redirect to another page in PH
Anuj Kumar
Hi! I am Anuj Kumar, a professional web developer with 5+ years of experience in this sector. I found PHPGurukul in September 2015. My keen interest in technology and sharing knowledge with others became the main reason for starting PHPGurukul. My basic aim is to offer all web development tutorials like PHP, PDO, jQuery, PHP oops, MySQL, etc.
Apart from the tutorials, we also offer you PHP Projects, and we have around 100+ PHP Projects for you.
Recommended Tutorials for you...
You may also like...