submitted by: Guest
PHP: redirect browser
Using the php header function, a browser can be redirected to another page.
code snippet:
<?php
//set url
$url = "http://www.example.com/";
// Redirect browser
header("Location: $url");
// stop executing this script
exit();
?>
notes:
The exit command in the snippet ensures that no additional code is executed from the current script.



