In PHP you can redirect a user to another page using the header() function.
<?php
header('Location: http://www.thesunmagazine.org');
?>
http://www.php.net/header
This function is used to modify the HTTP response headers sent out from the server. For this example the 'Location' header is modified, the browser then picks up on the modification and makes a new request from the new location specified.
Because this function modifies the HTTP headers, it may not be included
after output has started from the script.
For example:
<?php
echo 'Hello, world!';
header('Location: http://www.thesunmagazine.org');
?>
Would throw a warning level error saying something to the effect that headers cannot be modified, output already started at line x.
This, on the other hand, is valid because it uses output control functions to buffer script output.
<?php
ob_start();
echo 'Hello, world!';
header('Location: http://www.thesunmagazine.org');
ob_end_flush();
?>
Output from the script is written to the buffer, therefore, when the script reaches header() it is able to make HTTP header changes since nothing has yet been sent to the browser.
Output buffering increases resource consumption slightly because extra memory has to be allocated for the buffer.
More on output buffering:
http://www.php.net/outcontrol
hth,
: )
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::