Redirecting in PHP
In PHP you can easily redirect a user to another web page by setting the Location in the header of the response to be the location you want them to go to. For example,
will send the user to a page called "a-different-page.php" on your server. You can also include the full URL (with a protocol and a domain) to direct to other sites too.
<? header('Location: /a-different-page.php'); ?>
will send the user to a page called "a-different-page.php" on your server. You can also include the full URL (with a protocol and a domain) to direct to other sites too.
| Rating: | 100% positive, 1 Vote |
| Categories: | programming PHP web application php web |
| Added: | on Jul 17, 2008 at 7:27 am |
| Added By: | an anonymous user |

