Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to redirect from one webpage to another in PHP?
Posted
Comments
Mohibur Rashid 31-Mar-15 19:31pm    
Yes, try header

You can use the header function and redirect the user.

PHP
header("Location: <new-page>");


See this thread for more[^].
 
Share this answer
 
v2
To redirect from a php page to another page (not just php, you can redirect to any page this way), try this:

PHP
<?php 

header("Location:http://www.example.com/some_page.php"); 
exit; // <- don't forget this!

?>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900